panda.log.MDC Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-core Show documentation
Show all versions of panda-core Show documentation
Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.
package panda.log;
import java.util.HashMap;
import java.util.Map;
/**
* The MDC class provides mapped diagnostic contexts.
* A Mapped Diagnostic Context, or MDC in short, is an instrument for distinguishing interleaved log output from different sources.
* Log output is typically interleaved when a server handles multiple clients near-simultaneously.
*
* The MDC is managed on a per thread basis.
* A child thread automatically inherits a copy of the mapped diagnostic context of its parent.
*/
public class MDC {
private static final ThreadLocal