Class PatternFormatter
java.lang.Object
org.apache.logging.log4j.core.pattern.PatternFormatter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LogEventPatternConverterstatic final PatternFormatter[]The empty array.private final FormattingInfoprivate final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidformat(LogEvent event, StringBuilder buf) private voidformatWithInfo(LogEvent event, StringBuilder buf) booleanNormally pattern formatters are not meant to handle Exceptions although few pattern formatters might.booleanMost pattern formatters do not use location information.toString()Returns a String suitable for debugging.
-
Field Details
-
EMPTY_ARRAY
The empty array. -
converter
-
field
-
skipFormattingInfo
private final boolean skipFormattingInfo
-
-
Constructor Details
-
PatternFormatter
-
-
Method Details
-
format
-
formatWithInfo
-
getConverter
-
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
-
requiresLocation
public boolean requiresLocation()Most pattern formatters do not use location information. When they do they should return true here so that the logging system can efficiently capture it.- Returns:
- true if location information is required.
-
toString
Returns a String suitable for debugging.
-