Class Slf4jMDCAdapter
- java.lang.Object
-
- hu.icellmobilsoft.coffee.se.logging.mdc.Slf4jMDCAdapter
-
- All Implemented Interfaces:
MDCAdapter
public class Slf4jMDCAdapter extends Object implements MDCAdapter
MDC adapter fororg.slf4j.MDC- Since:
- 1.1.0
- Author:
- mark.petrenyi
-
-
Constructor Summary
Constructors Constructor Description Slf4jMDCAdapter()Slf4jMDCAdapter default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears the underlying MDC implementation.Stringget(String key)Gets value for key ornullfrom underlying MDC implementation.Map<String,String>getMap()Returns the diagnostic context map from the underlying MDC implementation.voidput(String key, String val)Puts value into underlying MDC implementation.voidremove(String key)Removes the value for key from the underlying MDC implementation.
-
-
-
Method Detail
-
put
public void put(String key, String val)
Puts value into underlying MDC implementation.- Specified by:
putin interfaceMDCAdapter- Parameters:
key- MDC lookup key fro the valueval- the value
-
get
public String get(String key)
Gets value for key ornullfrom underlying MDC implementation.- Specified by:
getin interfaceMDCAdapter- Parameters:
key- MDC lookup key- Returns:
- the value or
null
-
remove
public void remove(String key)
Removes the value for key from the underlying MDC implementation.- Specified by:
removein interfaceMDCAdapter- Parameters:
key- MDC lookup key
-
getMap
public Map<String,String> getMap()
Returns the diagnostic context map from the underlying MDC implementation.- Specified by:
getMapin interfaceMDCAdapter- Returns:
- the MDC map
-
clear
public void clear()
Clears the underlying MDC implementation.- Specified by:
clearin interfaceMDCAdapter
-
-