public class Log4jMDCAdapter
extends java.lang.Object
| Constructor and Description |
|---|
Log4jMDCAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
java.lang.String |
get(java.lang.String key) |
java.util.Map |
getCopyOfContextMap() |
void |
put(java.lang.String key,
java.lang.String val)
Put a context value (the
val parameter) as identified with
the key parameter into the current thread's context map. |
void |
remove(java.lang.String key) |
void |
setContextMap(java.util.Map contextMap) |
public void clear()
public java.lang.String get(java.lang.String key)
public void put(java.lang.String key,
java.lang.String val)
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.
java.lang.IllegalArgumentException - in case the "key" or "val" parameter is nullpublic void remove(java.lang.String key)
public java.util.Map getCopyOfContextMap()
public void setContextMap(java.util.Map contextMap)