-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
bugIncorrect, unexpected, or unintended behavior of existing codeIncorrect, unexpected, or unintended behavior of existing codelayoutsAffects one or more Layout pluginsAffects one or more Layout plugins
Milestone
Description
Description
We sometimes encounter broken timestamp fields in our logs since we upgraded to the latest Log4J version which has been released a few days ago.
The logged timestamp is cut off and cannot be parsed by our ElasticSearch backend. For example it looks like 2025-06-28T10:20:
(note how seconds, etc are missing)
I suspect the culprit is your switch to Java’s standard DateTimeFormatter in the latest release

Configuration
Version: 2.25.0
Operating system: Linux, 6.8.0-1024-aws
JDK: amazoncorretto:21-al2023
Reproduction
We cannot reproduce the behavior in a unit tests. It only happens roughly 20 times per day, out of more than 10k total log messages
We are using JsonTemplateLayout
with the following config (excerpt):
{
"@timestamp": {
"$resolver": "timestamp",
"pattern": {
"format": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"timeZone": "UTC"
}
},
Metadata
Metadata
Assignees
Labels
bugIncorrect, unexpected, or unintended behavior of existing codeIncorrect, unexpected, or unintended behavior of existing codelayoutsAffects one or more Layout pluginsAffects one or more Layout plugins
Type
Projects
Status
Done