Package org.slf4j.log4j12
Class Log4jMDCAdapter
java.lang.Object
org.slf4j.log4j12.Log4jMDCAdapter
- All Implemented Interfaces:
MDCAdapter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidPut a context value (thevalparameter) as identified with thekeyparameter into the current thread's context map.voidvoidsetContextMap(Map<String,String> contextMap)
-
Constructor Details
-
Log4jMDCAdapter
public Log4jMDCAdapter()
-
-
Method Details
-
clear
public void clear()- Specified by:
clearin interfaceMDCAdapter
-
get
- Specified by:
getin interfaceMDCAdapter
-
put
Put a context value (thevalparameter) as identified with thekeyparameter into the current thread's context map. Thekeyparameter cannot be null. Log4j does not support null for thevalparameter.This method delegates all work to log4j's MDC.
- Specified by:
putin interfaceMDCAdapter- Throws:
IllegalArgumentException- in case the "key" or "val" parameter is null
-
remove
- Specified by:
removein interfaceMDCAdapter
-
getCopyOfContextMap
- Specified by:
getCopyOfContextMapin interfaceMDCAdapter
-
setContextMap
- Specified by:
setContextMapin interfaceMDCAdapter
-