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()
LogCorrelationOtherwise the default is to only insert at entry points, such as incoming HTTP requests.
allScopes in interface LogCorrelationpublic java.lang.String key()
LogCorrelationkey in interface LogCorrelationpublic java.lang.String value()
LogCorrelationvalue in interface LogCorrelationpublic boolean normalize()
LogCorrelationFor 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 LogCorrelationCinnamon API. Copyright (c) 2015–2021 Lightbend.