Class PassThroughMDCLoggingContextHandler
- java.lang.Object
-
- de.hybris.platform.util.logging.context.PassThroughMDCLoggingContextHandler
-
- All Implemented Interfaces:
LoggingContextHandler
public class PassThroughMDCLoggingContextHandler extends java.lang.Object implements LoggingContextHandler
-
-
Constructor Summary
Constructors Constructor Description PassThroughMDCLoggingContextHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Remove all values from the contextjava.lang.Stringget(java.lang.String key)Gets the context value identified by the key parameterjava.util.Map<java.lang.String,java.lang.String>getCopyOfContextMap()Gets an copy of this current context mapvoidput(java.lang.String key, java.lang.String val)Put a value into the current context map.java.io.CloseableputCloseable(java.lang.String key, java.lang.String val)Put a value into the current context map.voidremove(java.lang.String key)Removes the context value identified by key parametervoidsetContextMap(java.util.Map<java.lang.String,java.lang.String> contextMap)Sets current context map to the map passed as parameter.
-
-
-
Method Detail
-
put
public void put(java.lang.String key, java.lang.String val)Description copied from interface:LoggingContextHandlerPut a value into the current context map.- Specified by:
putin interfaceLoggingContextHandler- Parameters:
key- - The key to putval- - The value to put associated with key
-
putCloseable
public java.io.Closeable putCloseable(java.lang.String key, java.lang.String val)Description copied from interface:LoggingContextHandlerPut a value into the current context map. This method return a Closeable object who can remove key when close is called.- Specified by:
putCloseablein interfaceLoggingContextHandler- 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
public java.lang.String get(java.lang.String key)
Description copied from interface:LoggingContextHandlerGets the context value identified by the key parameter- Specified by:
getin interfaceLoggingContextHandler- Parameters:
key- - The key to locate- Returns:
- The value associated with the key
-
remove
public void remove(java.lang.String key)
Description copied from interface:LoggingContextHandlerRemoves the context value identified by key parameter- Specified by:
removein interfaceLoggingContextHandler- Parameters:
key- - The key to remove
-
clear
public void clear()
Description copied from interface:LoggingContextHandlerRemove all values from the context- Specified by:
clearin interfaceLoggingContextHandler
-
getCopyOfContextMap
public java.util.Map<java.lang.String,java.lang.String> getCopyOfContextMap()
Description copied from interface:LoggingContextHandlerGets an copy of this current context map- Specified by:
getCopyOfContextMapin interfaceLoggingContextHandler- Returns:
- copy of the context.
-
setContextMap
public void setContextMap(java.util.Map<java.lang.String,java.lang.String> contextMap)
Description copied from interface:LoggingContextHandlerSets current context map to the map passed as parameter.- Specified by:
setContextMapin interfaceLoggingContextHandler- Parameters:
contextMap- the context map to use.
-
-