| java.lang.Object org.apache.log.format.PatternFormatter org.apache.log.format.ExtendedPatternFormatter org.apache.log.format.AvalonFormatter
AvalonFormatter | public class AvalonFormatter extends ExtendedPatternFormatter (Code) | | This formatter extends ExtendedPatternFormatter so that
CascadingExceptions are formatted with all nested exceptions.
class : outputs the name of the class that has logged the
message. The optional short subformat removes the
package name. Warning : this pattern works only if formatting occurs in
the same thread as the call to Logger, i.e. it won't work with
AsyncLogTarget .
author: Avalon Development Team |
Field Summary | |
final public static boolean | DEFAULT_PRINT_CASCADING The constant defining the default behaviour for printing
nested exceptions. | final public static int | DEFAULT_STACK_DEPTH The constant defining the default stack depth when
none other is specified. |
Constructor Summary | |
public | AvalonFormatter(String pattern) Construct the formatter with the specified pattern
and which which prints out exceptions to stackDepth of 8. | public | AvalonFormatter(String pattern, int stackDepth, boolean printCascading) Construct the formatter with the specified pattern
and which which prints out exceptions to stackDepth specified. |
DEFAULT_PRINT_CASCADING | final public static boolean DEFAULT_PRINT_CASCADING(Code) | | The constant defining the default behaviour for printing
nested exceptions.
|
DEFAULT_STACK_DEPTH | final public static int DEFAULT_STACK_DEPTH(Code) | | The constant defining the default stack depth when
none other is specified.
|
AvalonFormatter | public AvalonFormatter(String pattern)(Code) | | Construct the formatter with the specified pattern
and which which prints out exceptions to stackDepth of 8.
Parameters: pattern - The pattern to use to format the log entries |
AvalonFormatter | public AvalonFormatter(String pattern, int stackDepth, boolean printCascading)(Code) | | Construct the formatter with the specified pattern
and which which prints out exceptions to stackDepth specified.
Parameters: pattern - The pattern to use to format the log entries Parameters: stackDepth - The depth to which stacktraces are printed out Parameters: printCascading - true enables printing of nested exceptions,false only prints out the outermost exception |
getStackTrace | protected String getStackTrace(Throwable throwable, String format)(Code) | | Utility method to format stack trace.
Parameters: throwable - the throwable instance Parameters: format - ancilliary format parameter - allowed to be null the formatted string |
getTypeIdFor | protected int getTypeIdFor(String type)(Code) | | Retrieve the type-id for a particular string.
Parameters: type - the string the type-id |
Fields inherited from org.apache.log.format.PatternFormatter | final protected static int MAX_TYPE(Code)(Java Doc)
|
Methods inherited from org.apache.log.format.PatternFormatter | public String format(LogEvent event)(Code)(Java Doc) protected String formatPatternRun(LogEvent event, PatternRun run)(Code)(Java Doc) protected String getCategory(String category, String format)(Code)(Java Doc) protected String getContext(ContextStack stack, String format)(Code)(Java Doc) protected String getContextMap(ContextMap map, String format)(Code)(Java Doc) protected String getContextStack(ContextStack stack, String format)(Code)(Java Doc) protected String getMessage(String message, String format)(Code)(Java Doc) protected String getPriority(Priority priority, String format)(Code)(Java Doc) protected String getRTime(long time, String format)(Code)(Java Doc) protected String getStackTrace(Throwable throwable, String format)(Code)(Java Doc) protected String getThread(String format)(Code)(Java Doc) protected String getTime(long time, String format)(Code)(Java Doc) protected int getTypeIdFor(String type)(Code)(Java Doc) final protected void parse(String patternString)(Code)(Java Doc) public void setFormat(String format)(Code)(Java Doc)
|
|
|