public class Slf4jMdcTraceId extends java.lang.Object implements LogCorrelation
Constructor and Description |
---|
Slf4jMdcTraceId(com.typesafe.config.Config config,
LoggingProvider logging) |
Modifier and Type | Method and Description |
---|---|
boolean |
allScopes()
Whether to check and insert correlation identifiers for all context scopes.
|
java.lang.String |
key()
MDC key used for this log correlation.
|
boolean |
normalize()
Should the key name for this correlation identifier be normalized in MDC?
|
java.lang.String |
value()
Access or generate the correlation identifier for the current MDC scope.
|
public Slf4jMdcTraceId(com.typesafe.config.Config config, LoggingProvider logging)
public boolean allScopes()
LogCorrelation
Otherwise the default is to only insert at entry points, such as incoming HTTP requests.
allScopes
in interface LogCorrelation
public java.lang.String key()
LogCorrelation
key
in interface LogCorrelation
public java.lang.String value()
LogCorrelation
value
in interface LogCorrelation
public boolean normalize()
LogCorrelation
For example, if MDC contains the key "correlation-id", but the key()
is
configured as "Correlation-ID", enabling this setting will make Cinnamon scan the MDC keys and
normalize incorrect casing when it occurs.
normalize
in interface LogCorrelation
Cinnamon API. Copyright (c) 2015–2021 Lightbend.