[logback-user] Is it possible to acces MDC values as properties?
Stefan Eder
stefan.eder at ebuconnect.de
Wed Feb 22 14:17:19 CET 2012
Hi,
applies to Logback classic 1.0.0.
Is it possible to acces MDC values as properties like this:
<file>${catalina.base}/logs/exchanges/${breadcrumbId}-gsem.log</file>
<encoder>
<pattern>...</pattern>
</encoder>
where 'breadcrumbId' is mapped in the MDC.
The above example produces a file named breadcrumbId_IS_UNDEFINED-gsem.log.
The snippet is used in a sifting appender, but 'breadcrumbId' is not the
descriminator.
Do I have to use another notation or do I have to implement
ch.qos.logback.core.spi.PropertyDefiner?
Thanks,
Stefan
More information about the Logback-user
mailing list