org.apache.log.format
Class ExtendedPatternFormatter
org.apache.log.format.PatternFormatter
|
+--org.apache.log.format.ExtendedPatternFormatter
- All Implemented Interfaces:
- Formatter
- public class ExtendedPatternFormatter
- extends PatternFormatter
Formatter especially designed for debugging applications.
This formatter extends the standard PatternFormatter to add
two new possible expansions. These expansions are %{method}
and %{thread}. In both cases the context map is first checked
for values with specified key. This is to facilitate passing
information about caller/thread when threads change (as in
AsyncLogTarget). They then attempt to determine appropriate
information dynamically.
- Version:
- CVS $Revision: 1.3 $ $Date: 2001/11/19 12:18:33 $
- Author:
- Peter Donald
Methods inherited from class org.apache.log.format.PatternFormatter |
format, getCategory, getContext, getContextMap, getContextStack, getMessage, getPriority, getRTime, getStackTrace, getTime, parse, setFormat |
ExtendedPatternFormatter
public ExtendedPatternFormatter(java.lang.String format)
getTypeIdFor
protected int getTypeIdFor(java.lang.String type)
- Retrieve the type-id for a particular string.
- Overrides:
getTypeIdFor
in class PatternFormatter
- Parameters:
type
- the string- Returns:
- the type-id
formatPatternRun
protected java.lang.String formatPatternRun(LogEvent event,
PatternFormatter.PatternRun run)
- Formats a single pattern run (can be extended in subclasses).
- Overrides:
formatPatternRun
in class PatternFormatter
- Parameters:
run
- the pattern run to format.- Returns:
- the formatted result.
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.