org.ops4j.pax.logging
Class PaxContext
java.lang.Object
org.ops4j.pax.logging.PaxContext
public class PaxContext
- extends java.lang.Object
The MDC class is similar to the NDC
class except that it is
based on a map instead of a stack. It 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.
The MDC class requires JDK 1.2 or above. Under JDK 1.1 the MDC
will always return empty values but otherwise will not affect or
harm your application.
- Since:
- 1.2
- Author:
- Ceki Gülcü
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PaxContext
public PaxContext()
putAll
public void putAll(java.util.Map context)
put
public void put(java.lang.String key,
java.lang.Object o)
get
public java.lang.String get(java.lang.String key)
remove
public void remove(java.lang.String key)
getContext
public java.util.Map getContext()
clear
public void clear()
getCopyOfContextMap
public java.util.Map getCopyOfContextMap()
setContextMap
public void setContextMap(java.util.Map contextMap)
Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.