Interface DiagnosticLoggingAdapter

    • Method Detail

      • _mdc_$eq

        void _mdc_$eq​(scala.collection.immutable.Map<java.lang.String,​java.lang.Object> x$1)
      • clearMDC

        void clearMDC()
        Clear all entries in the MDC
      • getMDC

        java.util.Map<java.lang.String,​java.lang.Object> getMDC()
        Java API: Mapped Diagnostic Context for application defined values which can be used in PatternLayout when org.apache.pekko.event.slf4j.Slf4jLogger is configured. Visit Logback Docs: MDC for more information. Note tha it returns a COPY of the actual MDC values. You cannot modify any value by changing the returned Map. Code like the following won't have any effect unless you set back the modified Map.

        
           Map mdc = log.getMDC();
           mdc.put("key", value);
           // NEEDED
           log.setMDC(mdc);
         

        Returns:
        A copy of the actual MDC values
      • mdc

        scala.collection.immutable.Map<java.lang.String,​java.lang.Object> mdc()
        Scala API: Mapped Diagnostic Context for application defined values which can be used in PatternLayout when org.apache.pekko.event.slf4j.Slf4jLogger is configured. Visit Logback Docs: MDC for more information.

        Specified by:
        mdc in interface LoggingAdapter
        Returns:
        A Map containing the MDC values added by the application, or empty Map if no value was added.
      • mdc

        void mdc​(scala.collection.immutable.Map<java.lang.String,​java.lang.Object> mdc)
        Scala API: Sets the values to be added to the MDC (Mapped Diagnostic Context) before the log is appended. These values can be used in PatternLayout when org.apache.pekko.event.slf4j.Slf4jLogger is configured. Visit Logback Docs: MDC for more information.
      • setMDC

        void setMDC​(java.util.Map<java.lang.String,​java.lang.Object> jMdc)
        Java API: Sets the values to be added to the MDC (Mapped Diagnostic Context) before the log is appended. These values can be used in PatternLayout when org.apache.pekko.event.slf4j.Slf4jLogger is configured. Visit Logback Docs: MDC for more information.