Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Resolved
-
2.0, 2.0.1
Description
Discovered during investigation for LOG4J2-763, ParameterizedMessage currently initializes its String[] stringArgs field in the constructor. This may be wasted work if the message is not used, for example because the log level is below the filter threshold.
The stringArgs field should be initialized in the getFormattedString method, not earlier.
Attachments
Issue Links
- is related to
-
LOG4J2-898 Format messages asynchronously
- Resolved
- relates to
-
LOG4J2-763 Async loggers convert message parameters toString at log record writing not at log statement execution
- Resolved