akka.event
Interface DiagnosticLoggingAdapter

All Superinterfaces:
LoggingAdapter

public interface DiagnosticLoggingAdapter
extends LoggingAdapter

LoggingAdapter extension which adds MDC support. Only recommended to be used within Actors as it isn't thread safe.


Method Summary
 scala.collection.immutable.Map<java.lang.String,java.lang.Object> _mdc()
           
 void clearMDC()
          Clear all entries in the MDC
 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 Slf4jLogger is configured.
 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 Slf4jLogger is configured.
 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.
 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.
 
Methods inherited from interface akka.event.LoggingAdapter
debug, debug, debug, debug, debug, error, error, error, error, error, error, error, error, error, error, format, format1, info, info, info, info, info, isDebugEnabled, isEnabled, isErrorEnabled, isInfoEnabled, isWarningEnabled, log, log, log, log, log, notifyDebug, notifyError, notifyError, notifyInfo, notifyLog, notifyWarning, warning, warning, warning, warning, warning
 

Method Detail

_mdc

scala.collection.immutable.Map<java.lang.String,java.lang.Object> _mdc()

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 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 Slf4jLogger is configured. Visit Logback Docs: MDC for more information.


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 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

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 Slf4jLogger is configured. Visit Logback Docs: MDC for more information.


clearMDC

void clearMDC()
Clear all entries in the MDC