public interface DiagnosticLoggingAdapter extends LoggingAdapter
Modifier and Type | Method and Description |
---|---|
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
akka.event.slf4j.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
akka.event.slf4j.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.
|
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
scala.collection.immutable.Map<java.lang.String,java.lang.Object> mdc()
akka.event.slf4j.Slf4jLogger
is configured.
Visit Logback Docs: MDC for more information.
mdc
in interface LoggingAdapter
void mdc(scala.collection.immutable.Map<java.lang.String,java.lang.Object> mdc)
akka.event.slf4j.Slf4jLogger
is configured.
Visit Logback Docs: MDC for more information.mdc
- (undocumented)java.util.Map<java.lang.String,java.lang.Object> getMDC()
akka.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);
void setMDC(java.util.Map<java.lang.String,java.lang.Object> jMdc)
akka.event.slf4j.Slf4jLogger
is configured.
Visit Logback Docs: MDC for more information.jMdc
- (undocumented)void clearMDC()