Skip to content

Quarkus Json Logging: Timestamp is one year ahead. #45317

@turing85

Description

@turing85

Describe the bug

We set the Json loggin timestamp (quarkus.log.console.json.date-format) to YYYY-MM-dd HH:mm.ss.SSS. Since 2024-12-29 00:00:00.000 UTC, our applications log with a timestamp one year ahead (i.e. 2025-12-29 ...).

Expected behavior

The timestamp should show the year 2024.

Actual behavior

The timestamp should shows the year 2025.

How to Reproduce?

git clone https://github.com/turing85/quarkus-json-logging-bug && \
  cd quarkus-json-logging-bug
  • run the app
./mvnw clean quarkus:dev
  • observe that the timestamps show the year as 2025
...
Listening for transport dt_socket at address: 5005
{"timestamp":"2025-12-30 14:29:53.352","sequence":2152,"loggerClassName":"org.jboss.logging.Logger","loggerName":"io.quarkus","level":"INFO","message":"quarkus-json-logging-bug 999-SNAPSHOT on JVM (powered by Quarkus 3.17.5) started in 2.667s. Listening on: http://localhost:8080","threadName":"Quarkus Main Thread","threadId":125,"mdc":{},"ndc":"","hostName":"ecco","processName":"/opt/java/mandrel/23.1.3.1-java21/bin/java","processId":1255711}
{"timestamp":"2025-12-30 14:29:53.358","sequence":2154,"loggerClassName":"org.jboss.logging.Logger","loggerName":"io.quarkus","level":"INFO","message":"Profile dev activated. Live Coding activated.","threadName":"Quarkus Main Thread","threadId":125,"mdc":{},"ndc":"","hostName":"ecco","processName":"/opt/java/mandrel/23.1.3.1-java21/bin/java","processId":1255711}
{"timestamp":"2025-12-30 14:29:53.359","sequence":2156,"loggerClassName":"org.jboss.logging.Logger","loggerName":"io.quarkus","level":"INFO","message":"Installed features: [cdi, rest, smallrye-context-propagation, vertx]","threadName":"Quarkus Main Thread","threadId":125,"mdc":{},"ndc":"","hostName":"ecco","processName":"/opt/java/mandrel/23.1.3.1-java21/bin/java","processId":1255711}
...

Output of uname -a or ver

Linux xxx 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec  5 13:09:44 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)

Quarkus version or git rev

(at least) 3.8.5 - 3.17.5

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: /home/marco/.m2/wrapper/dists/apache-maven-3.9.9/3477a4f1
Java version: 21.0.3, vendor: Eclipse Adoptium, runtime: /opt/java/mandrel/23.1.3.1-java21
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.8.0-51-generic", arch: "amd64", family: "unix"

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions