Class Reload4jMDCAdapter

  • All Implemented Interfaces:
    org.slf4j.spi.MDCAdapter

    public class Reload4jMDCAdapter
    extends java.lang.Object
    implements org.slf4j.spi.MDCAdapter
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      void clearDequeByKey​(java.lang.String key)  
      java.lang.String get​(java.lang.String key)  
      java.util.Map getCopyOfContextMap()  
      java.util.Deque<java.lang.String> getCopyOfDequeByKey​(java.lang.String key)  
      java.lang.String popByKey​(java.lang.String key)  
      void pushByKey​(java.lang.String key, java.lang.String value)  
      void put​(java.lang.String key, java.lang.String val)
      Put a context value (the val parameter) as identified with the key parameter into the current thread's context map.
      void remove​(java.lang.String key)  
      void setContextMap​(java.util.Map<java.lang.String,​java.lang.String> contextMap)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • clear

        public void clear()
        Specified by:
        clear in interface org.slf4j.spi.MDCAdapter
      • get

        public java.lang.String get​(java.lang.String key)
        Specified by:
        get in interface org.slf4j.spi.MDCAdapter
      • put

        public void put​(java.lang.String key,
                        java.lang.String val)
        Put a context value (the val parameter) as identified with the key parameter into the current thread's context map. The key parameter cannot be null. Log4j does not support null for the val parameter.

        This method delegates all work to log4j's MDC.

        Specified by:
        put in interface org.slf4j.spi.MDCAdapter
        Throws:
        java.lang.IllegalArgumentException - in case the "key" or "val" parameter is null
      • remove

        public void remove​(java.lang.String key)
        Specified by:
        remove in interface org.slf4j.spi.MDCAdapter
      • getCopyOfContextMap

        public java.util.Map getCopyOfContextMap()
        Specified by:
        getCopyOfContextMap in interface org.slf4j.spi.MDCAdapter
      • setContextMap

        public void setContextMap​(java.util.Map<java.lang.String,​java.lang.String> contextMap)
        Specified by:
        setContextMap in interface org.slf4j.spi.MDCAdapter
      • pushByKey

        public void pushByKey​(java.lang.String key,
                              java.lang.String value)
        Specified by:
        pushByKey in interface org.slf4j.spi.MDCAdapter
      • popByKey

        public java.lang.String popByKey​(java.lang.String key)
        Specified by:
        popByKey in interface org.slf4j.spi.MDCAdapter
      • getCopyOfDequeByKey

        public java.util.Deque<java.lang.String> getCopyOfDequeByKey​(java.lang.String key)
        Specified by:
        getCopyOfDequeByKey in interface org.slf4j.spi.MDCAdapter
      • clearDequeByKey

        public void clearDequeByKey​(java.lang.String key)
        Specified by:
        clearDequeByKey in interface org.slf4j.spi.MDCAdapter