|
The most important part of the preferences are the templates. They affect which logger should be used. Templates are defined in the "Log4E" preferences root page. Several predefined templates are available (Log4j, Jakarta Commons Logging, JDK 1.4 Logging and ATG Logging). Options: - Show
Shows ready-made template definitions. These views are read only. Modifications are not saved! - Edit [Pro version only]
Opens a template definition for selfdefined templates which can be edited. The modification will be saved immediately when pressing "OK". - Duplicate [Pro version only]
One can duplicate a template to adapt it to his own logger. - Rename [Pro version only]
Rename a selfdefined template. - Remove [Pro version only]
Only selfdefined templates are allowed to remove. To confirm the deletion one must press "OK" or "Apply".
Level Statements Tab You can specify level statements for any of these levels: FINEST, FINER, TRACE, DEBUG, INFO, WARN, ERROR, FATAL. The denotation of the levels is a mixture between Commons Logging and JDK 1.4 logging denotation. FINEST is the lowest level and is only used in JDK 1.4 logging. FATAL is the highest level and is equivalent to SEVERE in JDK 1.4 logging. Note that these level and methods are not available for all loggers (e.g. Log4j doesn't support TRACE, but the Apache Commons Logger does). Options:
Is<Level>Enabled Statements Tab Define the methods which check the level before executing the log statement here. These statements are only used if specified in the Log4E > Statements preference page. Options: Position Statements Tab "Position Statements" is an alternative to the level statements described above. They are introduced in JDK 1.4 logging and are special statements for particular method entries: Options: - Start Statement
E.g ${logger}.entering("${enclosing_type}", "${enclosing_method}", "${message}${delimiter}${message_user}") in JDK 1.4 logging. It will be inserted at start position if Log4E > Positions > Method Start > Use position log statements ... is checked. - End Statement
E.g ${logger}.exiting("${enclosing_type}", "${enclosing_method}", "${message}${delimiter}${message_user}${delimiter}${return_value}") in JDK 1.4 logging. It will be inserted at end position if Log4E > Positions > Method Exit > Use position log statements ... is checked. - Throwing Statement
E.g ${logger}.throwing("${enclosing_type}", "${enclosing_method}", ${exception}) in JDK 1.4 logging. It will be inserted at catch position if Log4E > Positions > Catch Block > Use position log statements ... is checked.
As a result the logger statements are automatically inserted like in that example:
public String myMethod(String arg1) { logger.entering("MyClass", "myMethod()", "start");
//Your code.... logger.entering("MyClass", "myMethod()", "end - return value = myString"); return "myString"; }
Is<Position>Enabled Statements Tab These statements are equivalent to the Is<Level>Enabled Statements described above. Options:
Format
Define the specific format settings for this logger framework.
|