org.slf4j.impl
Class Log4jMDCAdapter
java.lang.Object
org.slf4j.impl.Log4jMDCAdapter
- All Implemented Interfaces:
- MDCAdapter
public class Log4jMDCAdapter
- extends Object
- implements MDCAdapter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Log4jMDCAdapter
public Log4jMDCAdapter()
clear
public void clear()
- Specified by:
clear
in interface MDCAdapter
get
public String get(String key)
- Specified by:
get
in interface MDCAdapter
put
public void put(String key,
String val)
- Put a context value (the
val
parameter) as identified with
the key
parameter into the current thread's context map. The
key
parameter cannot be null. Log4j does not
support null for the val
parameter.
This method delegates all work to log4j's MDC.
- Specified by:
put
in interface MDCAdapter
- Throws:
IllegalArgumentException
- in case the "key" or "val" parameter is null
remove
public void remove(String key)
- Specified by:
remove
in interface MDCAdapter
getCopyOfContextMap
public Map getCopyOfContextMap()
- Specified by:
getCopyOfContextMap
in interface MDCAdapter
setContextMap
public void setContextMap(Map contextMap)
- Specified by:
setContextMap
in interface MDCAdapter
Copyright © 2005-2011 QOS.ch. All Rights Reserved.