Openfire 3.6.1 Javadoc

org.jivesoftware.util.log.format
Class ExtendedPatternFormatter

java.lang.Object
  extended by org.jivesoftware.util.log.format.PatternFormatter
      extended by org.jivesoftware.util.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: 37 $ $Date: 2004-10-20 23:08:43 -0700 (Wed, 20 Oct 2004) $
Author:
Peter Donald

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jivesoftware.util.log.format.PatternFormatter
PatternFormatter.PatternRun
 
Field Summary
 
Fields inherited from class org.jivesoftware.util.log.format.PatternFormatter
MAX_TYPE
 
Constructor Summary
ExtendedPatternFormatter(String format)
           
 
Method Summary
protected  String formatPatternRun(LogEvent event, PatternFormatter.PatternRun run)
          Formats a single pattern run (can be extended in subclasses).
protected  int getTypeIdFor(String type)
          Retrieve the type-id for a particular string.
 
Methods inherited from class org.jivesoftware.util.log.format.PatternFormatter
format, getCategory, getContextMap, getMessage, getPriority, getRTime, getStackTrace, getTime, parse, setFormat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedPatternFormatter

public ExtendedPatternFormatter(String format)
Method Detail

getTypeIdFor

protected int getTypeIdFor(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 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.

Openfire 3.6.1 Javadoc

Copyright © 2003-2008 Jive Software.