Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
Description
After , the MDC map is no longer in InheritableThreadLocal.LOGBACK-620
So when you MDC.put on a thread if you create a new thread from it, the new thread will not receive the value.
I think the was about not copying the map on each thread creation but only when it the map is modified, but the lost of inherited value was unexpected.LOGBACK-620
If so replacing
final ThreadLocal<Map<String, String>> copyOnThreadLocal = new ThreadLocal<Map<String, String>>();
by
final ThreadLocal<Map<String, String>> copyOnThreadLocal = new InheritableThreadLocal<Map<String, String>>();
will do the fix