| Removal of the current logger statements [pro version only] |
OverviewThe actions "Remove logger in this method" and "Remove logger of this class" automatically remove all logger statements in the method or class. On class scope the logger declaration and imports are removed, too. See also the screenshots. Log4E needs to know which logger framework is used because it removes all statements defined in the logger framwork templates (Preferences:Templates). See the screenshots for a quick overview. Example: Before: import org.apache.log4j.Logger; public class MyClass {//Your code... try {After: public class MyClass {//Your code... try {
A special case is when your code is woven into a is<Level>Enabled() statement. In that case Log4E pops up a warning that not all code can be removed. Only the logger statements without any user code can be removed. Example: Before: import org.apache.log4j.Logger; public class MyClass {// user code After: import org.apache.log4j.Logger; public class MyClass {
|