Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.5
-
None
-
None
Description
To do
The following pattern converters can be modified to avoid creating temporary objects in their format method:
all done
Investigate
The following pattern converters may be difficult to modify since they rely on JDK components that create temporary objects:
ExtendedThrowablePatternConverter
RegexReplacementConverter
RootThrowablePatternConverter
ThrowablePatternConverter
UuidPatternConverter
ClassNamePatternConverter (location information requires creating StackTraceElements)
FileLocationPatternConverter
FullLocationPatternConverter
LineLocationPatternConverter
MethodLocationPatternConverter
Done
The following pattern converters already do not allocate temporary objects in their format method:
AbstractStyleNameConverter (since 2.8)
HighlightConverter (since 2.7, thanks to Richard Zschech)
StyleConverter (since 2.7, thanks to Richard Zschech)
DatePatternConverter
EqualsIgnoreCaseReplacementConverter (since 2.8)
EqualsReplacementConverter (since 2.8)
EncodingPatternConverter (since 2.8)
IntegerPatternConverter (since 2.8)
LevelPatternConverter
LineSeparatorPatternConverter
LiteralPatternConverter (unless literal contains '${')
LoggerPatternConverter
MapPatternConverter (since 2.8 - note that constructing a MapMessage is not garbage-free)
MarkerPatternConverter (since 2.8)
MarkerSimpleNamePatternConverter
MaxLengthConverter (since 2.8)
MdcPatternConverter (since 2.7)
MessagePatternConverter (unless a Jansi or HTML renderer is configured or message has '${' lookups)
NamePatternConverter
NanoTimePatternConverter
NdcPatternConverter (since 2.8 ContextStack implementations implement the StringBuilderFormattable interface - note that the ThreadContext stack is cloned for each log event and is not garbage-free)
RelativeTimePatternConverter (since 2.8)
SequenceNumberPatternConverter (since 2.8)
ThreadIdPatternConverter
ThreadNamePatternConverter
ThreadPriorityPatternConverter
VariablesNotEmptyReplacementConverter (since 2.8)
Attachments
Issue Links
- is related to
-
LOG4J2-1367 Performance improvement for %highlight with Normal
-
- Open
-
- links to