org.apache.log4j
Class MDC

java.lang.Object
  extended by org.apache.log4j.MDC

public class MDC
extends java.lang.Object

Wrap the PaxContext with MDC api. PaxContext is derived from original MDC.


Constructor Summary
MDC()
           
 
Method Summary
static void dispose()
          Pax Logging internal method.
static java.lang.Object get(java.lang.String key)
          Get the context identified by the key parameter.
static java.util.Map getContext()
          Get the current thread's MDC as a map.
static void put(java.lang.String key, java.lang.Object o)
          Put a context value (the o parameter) as identified with the key parameter into the current thread's context map.
static void remove(java.lang.String key)
          Remove the the context identified by the key parameter.
static void setBundleContext(org.osgi.framework.BundleContext ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MDC

public MDC()
Method Detail

setBundleContext

public static void setBundleContext(org.osgi.framework.BundleContext ctx)

put

public static void put(java.lang.String key,
                       java.lang.Object o)
Put a context value (the o parameter) as identified with the key parameter into the current thread's context map.

If the current thread does not have a context map it is created as a side effect.


get

public static java.lang.Object get(java.lang.String key)
Get the context identified by the key parameter.

This method has no side effects.


remove

public static void remove(java.lang.String key)
Remove the the context identified by the key parameter.


getContext

public static java.util.Map getContext()
Get the current thread's MDC as a map.


dispose

public static void dispose()
Pax Logging internal method. Should never be used directly.



Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.