org.apache.log.format
org.apache.avalon.framework.logger.AvalonFormatter
instead of this one.public class AvalonFormatter extends ExtendedPatternFormatter
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.PatternFormatter.PatternRun| Modifier and Type | Field and Description |
|---|---|
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.
|
MAX_TYPE| Constructor and Description |
|---|
AvalonFormatter(java.lang.String pattern)
Deprecated.
Construct the formatter with the specified pattern
and which which prints out exceptions to stackDepth of 8.
|
AvalonFormatter(java.lang.String pattern,
int stackDepth,
boolean printCascading)
Deprecated.
Construct the formatter with the specified pattern
and which which prints out exceptions to stackDepth specified.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
formatPatternRun(LogEvent event,
PatternFormatter.PatternRun run)
Deprecated.
Formats a single pattern run (can be extended in subclasses).
|
protected java.lang.String |
getStackTrace(java.lang.Throwable throwable,
java.lang.String format)
Deprecated.
Utility method to format stack trace.
|
protected int |
getTypeIdFor(java.lang.String type)
Deprecated.
Retrieve the type-id for a particular string.
|
format, getCategory, getContext, getContextMap, getContextStack, getMessage, getPriority, getRTime, getThread, getTime, parse, setFormatpublic static final int DEFAULT_STACK_DEPTH
public static final boolean DEFAULT_PRINT_CASCADING
public AvalonFormatter(java.lang.String pattern)
pattern - The pattern to use to format the log entriespublic AvalonFormatter(java.lang.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 exceptionprotected java.lang.String getStackTrace(java.lang.Throwable throwable,
java.lang.String format)
getStackTrace in class PatternFormatterthrowable - the throwable instanceformat - ancilliary format parameter - allowed to be nullprotected int getTypeIdFor(java.lang.String type)
getTypeIdFor in class ExtendedPatternFormattertype - the stringprotected java.lang.String formatPatternRun(LogEvent event, PatternFormatter.PatternRun run)
ExtendedPatternFormatterformatPatternRun in class ExtendedPatternFormatterevent - the log eventrun - the pattern run to format.