org.apache.log4j
Class MDC

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

public class MDC
extends 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 Object get(String key)
          Get the context identified by the key parameter.
static Map getContext()
          Get the current thread's MDC as a map.
static void put(String key, 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(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(String key,
                       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 Object get(String key)
Get the context identified by the key parameter.

This method has no side effects.


remove

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


getContext

public static 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-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.