Class ThreadContextDataProvider
java.lang.Object
org.apache.logging.log4j.core.impl.ThreadContextDataProvider
- All Implemented Interfaces:
ContextDataProvider
ContextDataProvider for ThreadContext data.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a Map containing context data to be injected into the event or null if no context data is to be added.Returns the context data as a StringMap.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.logging.log4j.core.util.ContextDataProvider
getValue
-
Constructor Details
-
ThreadContextDataProvider
public ThreadContextDataProvider()
-
-
Method Details
-
supplyContextData
Description copied from interface:ContextDataProvider
Returns a Map containing context data to be injected into the event or null if no context data is to be added.Thread-safety note: The returned object can safely be passed off to another thread: future changes in the underlying context data will not be reflected in the returned object.
- Specified by:
supplyContextData
in interfaceContextDataProvider
- Returns:
- A Map containing the context data or null.
-
supplyStringMap
Description copied from interface:ContextDataProvider
Returns the context data as a StringMap.Thread-safety note: The returned object can safely be passed off to another thread: future changes in the underlying context data will not be reflected in the returned object.
- Specified by:
supplyStringMap
in interfaceContextDataProvider
- Returns:
- the context data in a StringMap.
-