|
||||||||
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
_______________________________________________ logback-dev mailing list logback-dev@qos.ch http://mailman.qos.ch/mailman/listinfo/logback-dev
Records (see
LOGBACK-355andLOGBACK-489, seem to indicate that logback's MDC behavior is a heritage (pun intended) of log4j. SVN commits for log4j dating back to 2001 show that MDC values were "always" inherited in log4j.Contrary to the impression one might get by reading the comments above, the inheritance approach is not completely brain dead. Indeed, if MDC values were not automatically inherited by child threads, the parent thread would have to somehow pass the MDC values to its children. With automatic inheritance, the child threads "only" needs to cull values it does not want to inherit. This may be counter-intuitive for the uninitiated and require some extra code, admittedly increasing accidental complexity.
In our present predicament, the best I can think of is to stop propagation to child threads for keys with a certain pattern, say a '*' suffix. Example: