This class hides and serves as a substitute for the underlying logging
system's MDC implementation.
If the underlying logging system offers MDC functionality, then SLF4J's MDC,
i.e. this class, will delegate to the underlying system's MDC. Note that at
this time, only two logging systems, namely log4j and logback, offer MDC
functionality. If the undelying system does not support MDC, then SLF4J will
silently drop MDC information.
Thus, as a SLF4J user, you can take advantage of MDC in the presence of log4j
or logback, but without forcing log4j or logback as dependencies upon your
users.
For more information on MDC please see the chapter on MDC in the
logback manual.
Please note that all methods in this class are static.
author: Ceki Gülcü since: 1.4.1 |