
Hi there, Considering a switch from log4j to logback... I use log4j's NDC functionality in order to be able to easily trace a webapp request through all levels of my code with minimal effort. So, why didn't NDC make it into logback, and what alternatives do I have for replacing NDC if I do switch to logback? Thanks! Mark

Hello Mark, Logback offers an alternative to log4j NDC (nested diagnostic context) with a similar concept called MDC (mapped diagnostic context). See http://logback.qos.ch/manual/mdc.html for further details. We dropped NDC in favor of MDC because the latter is easier to manage. With MDC you need to manage a map instead of a stack. By the way, log4j has both NDC and MDC. HTH, Mark Libucha wrote:
Hi there,
Considering a switch from log4j to logback...
I use log4j's NDC functionality in order to be able to easily trace a webapp request through all levels of my code with minimal effort.
So, why didn't NDC make it into logback, and what alternatives do I have for replacing NDC if I do switch to logback?
Thanks!
Mark _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch
participants (2)
-
Ceki Gulcu
-
Mark Libucha