|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.log.format.PatternFormatter | +--org.apache.log.format.ExtendedPatternFormatter | +--org.apache.log.format.AvalonFormatter
org.apache.avalon.framework.logger.AvalonFormatter
instead of this one.
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
.
Nested Class Summary |
Nested classes inherited from class org.apache.log.format.PatternFormatter |
PatternFormatter.PatternRun |
Field Summary | |
static boolean |
DEFAULT_PRINT_CASCADING
Deprecated. The constant defining the default behaviour for printing nested exceptions. |
static int |
DEFAULT_STACK_DEPTH
Deprecated. The constant defining the default stack depth when none other is specified. |
Fields inherited from class org.apache.log.format.PatternFormatter |
MAX_TYPE |
Constructor Summary | |
AvalonFormatter(String pattern)
Deprecated. Construct the formatter with the specified pattern and which which prints out exceptions to stackDepth of 8. |
|
AvalonFormatter(String pattern,
int stackDepth,
boolean printCascading)
Deprecated. Construct the formatter with the specified pattern and which which prints out exceptions to stackDepth specified. |
Method Summary | |
protected String |
formatPatternRun(LogEvent event,
PatternFormatter.PatternRun run)
Deprecated. Formats a single pattern run (can be extended in subclasses). |
protected String |
getStackTrace(Throwable throwable,
String format)
Deprecated. Utility method to format stack trace. |
protected int |
getTypeIdFor(String type)
Deprecated. Retrieve the type-id for a particular string. |
Methods inherited from class org.apache.log.format.PatternFormatter |
format, getCategory, getContext, getContextMap, getContextStack, getMessage, getPriority, getRTime, getThread, getTime, parse, setFormat |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_STACK_DEPTH
public static final boolean DEFAULT_PRINT_CASCADING
Constructor Detail |
public AvalonFormatter(String pattern)
pattern
- The pattern to use to format the log entriespublic AvalonFormatter(String pattern, int stackDepth, boolean printCascading)
pattern
- The pattern to use to format the log entriesstackDepth
- The depth to which stacktraces are printed outprintCascading
- true enables printing of nested exceptions,
false only prints out the outermost exceptionMethod Detail |
protected String getStackTrace(Throwable throwable, String format)
getStackTrace
in class PatternFormatter
throwable
- the throwable instanceformat
- ancilliary format parameter - allowed to be null
protected int getTypeIdFor(String type)
getTypeIdFor
in class ExtendedPatternFormatter
type
- the string
protected String formatPatternRun(LogEvent event, PatternFormatter.PatternRun run)
ExtendedPatternFormatter
formatPatternRun
in class ExtendedPatternFormatter
event
- the log eventrun
- the pattern run to format.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |