ppkarwasz commented on issue #2499: URL: https://github.com/apache/logging-log4j2/issues/2499#issuecomment-2079800141
@rgoers, The problem this tries to solve is to prevent context propagators from copying both `MDC#getCopyOfContextMap()` and `ThreadContext#getImmutableMapOrNull()` between threads. Since these two methods return the same data, it would be nice to only propagate one of them: `MDC` if the user uses Logback and `ThreadContext` if the user uses Log4j Core. In the case of `MDC` and `ThreadContext` propagating both of the is only not effective, but for other logging backends it might even be wrong. For example [`org.jboss.logmanager.MDC`](https://javadoc.io/doc/org.jboss.logmanager/jboss-logmanager/latest/org/jboss/logmanager/MDC.html) supports objects. If we propagate its data using `ThreadContext` we will loose information. -- 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]
