Horst Gernhardt created LOG4J2-3461:
---------------------------------------
Summary: MDC in Log4j1 bridge is not interoperable with Log4j2 or
other brigdes
Key: LOG4J2-3461
URL: https://issues.apache.org/jira/browse/LOG4J2-3461
Project: Log4j 2
Issue Type: Bug
Components: Core
Affects Versions: 2.17.2
Reporter: Horst Gernhardt
Attachments: ThreadContextConsistencyTest.java, pom.xml
When invoking {{org.apache.log4j.MDC.get(key)}} on library
{{{}org.apache.logging.log4j:log4j-1.2-api
{}}}you don'thave access to Thread-Context variables that where set with
* org.apache.logging.log4j.ThreadContext.put(key, value) from
{{org.apache.logging.log4j:log4j-core}}
* {{org.slf4j.MDC.put(key, value)}} from
{{org.apache.logging.log4j:log4j-slf4j-impl}}
* probably pother brigdes too
See JUnit tests in [^ThreadContextConsistencyTest.java] from a simple maven
project with [^pom.xml]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)