Class PatternFormatter
java.lang.Object
org.apache.logging.log4j.core.pattern.PatternFormatter
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
format
(LogEvent event, StringBuilder buf) boolean
Normally pattern formatters are not meant to handle Exceptions although few pattern formatters might.boolean
Most pattern formatters do not use location information.toString()
Returns a String suitable for debugging.
-
Field Details
-
EMPTY_ARRAY
The empty array.
-
-
Constructor Details
-
PatternFormatter
-
-
Method Details
-
format
-
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.
-