Interface LoggingContextHandler
- All Known Implementing Classes:
NOPLoggingContextHandler,PassThroughMDCLoggingContextHandler
public interface LoggingContextHandler
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Remove all values from the contextGets the context value identified by the key parameterGets an copy of this current context mapvoidPut a value into the current context map.putCloseable(String key, String val) Put a value into the current context map.voidRemoves the context value identified by key parametervoidsetContextMap(Map<String, String> contextMap) Sets current context map to the map passed as parameter.
-
Method Details
-
put
Put a value into the current context map.- Parameters:
key- - The key to putval- - The value to put associated with key
-
putCloseable
Put a value into the current context map. This method return a Closeable object who can remove key when close is called.- Parameters:
key- - The key to putval- - The value to put associated with key- Returns:
- a Closeable who can remove key when close is called
-
get
Gets the context value identified by the key parameter- Parameters:
key- - The key to locate- Returns:
- The value associated with the key
-
remove
Removes the context value identified by key parameter- Parameters:
key- - The key to remove
-
clear
void clear()Remove all values from the context -
getCopyOfContextMap
Gets an copy of this current context map- Returns:
- copy of the context.
-
setContextMap
Sets current context map to the map passed as parameter.- Parameters:
contextMap- the context map to use.
-