[logback-user] Unable to use SLF4j's MDC with logback 0.9.7.
matg
matthieu.guamis at axege.com
Fri Sep 14 18:54:14 CEST 2007
Hi there,
Just to say that MDC data is not inherited by child threads in release
0.9.8.
It seems that revision 1583 of LogbackMDCAdapter (which implements
inheritability) is not included in the latest release. So be carreful with
the use of MDC if you don't use latest revision!
Thanks for your great work
Ceki Gulcu-2 wrote:
>
> Hi Pascal,
>
> Thank you for your comments. Logback 0.9.8 release is scheduled for next
> week.
> This should solve the problems you mention.
>
> Cheers,
>
> Pascal Jacob wrote:
>> Hello dear logback commiters,
>>
>> I'm trying to use SLF4j MDC in my multithread program and i'm having the
>> following error:
>>
>> SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder".
>> SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for
>> further details.
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/slf4j/impl/StaticMDCBinder
>> at org.slf4j.MDC.<clinit>(MDC.java:70)
>> at fr.mipih.jms.AsynchConsumer.<init>(AsynchConsumer.java:50)
>> at fr.mipih.jms.AsynchConsumer.main(AsynchConsumer.java:182)
>>
>> I have the following jars in the classpath :
>>
>> slf4j-api-1.4.2.jar
>> jcl104-over-slf4j-1.4.2.jar
>> logback-classic-0.9.7.jar
>> logback-core-0.9.7.jar
>>
>> I have check the content of the jars and in fact StaticMDCBinder is
>> nowhere to be found (should be in logback-classic-0.9.7.jar as I
>> understand it)
>>
>> I have checked the repository at http://svn.qos.ch/repos/logback/trunk
>> and found that StaticMDCBinder was added in
>> logback-classic\src\main\java\org\slf4j\impl back somewhere in may.
>>
>> I have no [easy] way to compile the new source code on my platform since
>> logback use maven (don't have it, don't want to install it, don't want
>> to learn how to use it).
>>
>> Isn't it time to release a 0.9.8 or something (why not a 1.0) so that
>> slf4j's MDC (and other bug fixes) are available to the majority ?
>>
>> TIA.
>>
>> ZC.
>>
>> _______________________________________________
>> Logback-user mailing list
>> Logback-user at qos.ch
>> http://qos.ch/mailman/listinfo/logback-user
>
> --
> Ceki Gülcü
> Logback: The reliable, generic, fast and flexible logging framework for
> Java.
> http://logback.qos.ch
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
>
>
--
View this message in context: http://www.nabble.com/Unable-to-use-SLF4j%27s-MDC-with-logback-0.9.7.-tf4268573.html#a12679606
Sent from the Logback User mailing list archive at Nabble.com.
More information about the Logback-user
mailing list