Interface ContextDataProvider
-
- All Known Implementing Classes:
ThreadContextDataProvider
public interface ContextDataProviderSource of context data to be added to each log event.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ObjectgetValue(String key)Retrieves a single context data value.Map<String,String>supplyContextData()Returns a Map containing context data to be injected into the event or null if no context data is to be added.default StringMapsupplyStringMap()Returns the context data as a StringMap.
-
-
-
Method Detail
-
supplyContextData
Map<String,String> supplyContextData()
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.
- Returns:
- A Map containing the context data or null.
-
supplyStringMap
default StringMap supplyStringMap()
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.
- Returns:
- the context data in a StringMap.
-
-