| java.lang.Object org.apache.log.format.PatternFormatter org.apache.log.format.ExtendedPatternFormatter
All known Subclasses: org.apache.log.format.AvalonFormatter,
ExtendedPatternFormatter | public class ExtendedPatternFormatter extends PatternFormatter (Code) | | 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.
author: Avalon Development Team author: Peter Donald version: CVS $Revision: 1.11 $ $Date: 2003/02/09 23:33:22 $ |
Method Summary | |
protected String | formatPatternRun(LogEvent event, PatternRun run) Formats a single pattern run (can be extended in subclasses).
Parameters: event - the log event Parameters: run - the pattern run to format. | protected int | getTypeIdFor(String type) Retrieve the type-id for a particular string. |
ExtendedPatternFormatter | public ExtendedPatternFormatter(String format)(Code) | | Creation of a new extended pattern formatter.
Parameters: format - the format string |
ExtendedPatternFormatter | public ExtendedPatternFormatter(String format, int callStackOffset)(Code) | | Creation of a new extended pattern formatter.
Parameters: format - the format string Parameters: callStackOffset - the offset |
formatPatternRun | protected String formatPatternRun(LogEvent event, PatternRun run)(Code) | | Formats a single pattern run (can be extended in subclasses).
Parameters: event - the log event Parameters: run - the pattern run to format. the formatted result. |
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)
|
|
|