org.apache.logging.log4j.core.pattern
Class PatternFormatter

java.lang.Object
  extended by org.apache.logging.log4j.core.pattern.PatternFormatter

public class PatternFormatter
extends Object


Constructor Summary
PatternFormatter(LogEventPatternConverter converter, FormattingInfo field)
           
 
Method Summary
 void format(LogEvent event, StringBuilder buf)
           
 LogEventPatternConverter getConverter()
           
 FormattingInfo getFormattingInfo()
           
 boolean handlesThrowable()
          Normally pattern formatters are not meant to handle Exceptions although few pattern formatters might.
 String toString()
          Returns a String suitable for debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PatternFormatter

public PatternFormatter(LogEventPatternConverter converter,
                        FormattingInfo field)
Method Detail

format

public void format(LogEvent event,
                   StringBuilder buf)

getConverter

public LogEventPatternConverter getConverter()

getFormattingInfo

public FormattingInfo getFormattingInfo()

handlesThrowable

public boolean handlesThrowable()
Normally pattern formatters are not meant to handle Exceptions although few pattern formatters might.

By examining the return values for this method, the containing layout will determine whether it handles throwables or not.

Returns:
true if this PatternConverter handles throwables

toString

public String toString()
Returns a String suitable for debugging.

Overrides:
toString in class Object
Returns:
a String suitable for debugging.


Copyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.