
22 Feb
2012
22 Feb
'12
1:17 p.m.
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