public class PatternFormatter extends Object
Modifier and Type | Field and Description |
---|---|
static PatternFormatter[] |
EMPTY_ARRAY
The empty array.
|
Constructor and Description |
---|
PatternFormatter(LogEventPatternConverter converter,
FormattingInfo field) |
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
requiresLocation()
Most pattern formatters do not use location information.
|
String |
toString()
Returns a String suitable for debugging.
|
public static final PatternFormatter[] EMPTY_ARRAY
public PatternFormatter(LogEventPatternConverter converter, FormattingInfo field)
public void format(LogEvent event, StringBuilder buf)
public LogEventPatternConverter getConverter()
public FormattingInfo getFormattingInfo()
public boolean handlesThrowable()
By examining the return values for this method, the containing layout will determine whether it handles throwables or not.
public boolean requiresLocation()
Copyright © 1999-2021 The 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.