Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.4.8, 1.4.9, 1.4.11
-
macOS Ventura 13.6.2
OpenJDK 17.0.8
Spring Boot 3.1.3
Description
Starting from version 1.4.8 of Logback, an issue has been observed where MDC properties are no longer associated with log statements when a custom MDCAdapter, for instance com.twitter.inject.logging.FinagleMDCAdapter, is set in the application.
The likely root cause is that, beginning with version 1.4.8, Logback obtains the MDCAdapter from {{ch.qos.logback.classic.LoggerContext}} instead of directly getting it from MDC. Consequently, the application ends up using two separate and independent MDCAdapters concurrently.
You can find a simplified application created to reproduce this issue in the following repository: https://github.com/naser-ayat/logback-bug-reproducer