ppkarwasz commented on a change in pull request #683:
URL: https://github.com/apache/logging-log4j2/pull/683#discussion_r837730815
##########
File path:
log4j-core/src/main/java/org/apache/logging/log4j/core/layout/Rfc5424Layout.java
##########
@@ -92,11 +97,12 @@
*/
public static final String DEFAULT_MDCID = "mdc";
+ private static final FixedDateFormat FIXED_DATE_FORMAT_MILLI_PRECISION =
FixedDateFormat
+ .create(FixedFormat.ISO8601_OFFSET_DATE_TIME_HHCMM_PERIOD);
+ private static final FixedDateFormat FIXED_DATE_FORMAT_MICRO_PRECISION =
FixedDateFormat
+ .create(FixedFormat.ISO8601_OFFSET_DATE_TIME_HHCMM_PERIOD_MICRO);
+
Review comment:
I would use a (non static)
`org.apache.logging.log4j.core.pattern.DatePatternConverter` to keep the layout
garbage free.
Otherwise, you might use a (non static) character array, to serialize
timestamps without creating new `String` objects.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]