panda.log.MDC Maven / Gradle / Ivy
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