[slf4j-user] How to debug with logger gets used?

Ceki Gulcu ceki at qos.ch
Thu Jun 18 11:38:43 CEST 2009


Hello Wim,

Glad to hear that you could debug the problem on your own. As for other options, 
I don't have a better proposal than excluding slf4j-nop.

BR

Wim Deblauwe wrote:
> I found the problem. It seems the only location you need to look is your
> classpath. Since I am using maven a simple 'mvn dependency:tree' tells me
> the following:
> 
> [INFO] +- org.dbunit:dbunit:jar:2.3.0:test
> [INFO] |  +- junit-addons:junit-addons:jar:1.4:test
> [INFO] |  |  \- xerces:xmlParserAPIs:jar:2.6.2:test
> [INFO] |  +- org.apache.poi:poi:jar:3.1-FINAL:test
> [INFO] |  \- org.slf4j:slf4j-nop:jar:1.4.3:test
> 
> I am using dbunit and they have a dependency on slf4j-nop for testing.
> However, I had imported my project in IntelliJ, which only has 1 classpath,
> not a separate one for testing. So the slf4j-nop ended up in my normal
> classpath. I now manually removed the slf4j-nop.jar from IntelliJ classpath,
> but I wonder how this can be avoided in the future? I was thinking about
> defining an <exclusion/> but I don't know if there are any other (better?)
> options?
> 
> regards,
> 
> Wim
> 
> 
> Wim Deblauwe wrote:
>> Hi,
>>
>> I am using slf4j 1.5.6 with slf4j-log4j12 1.5.6 and log4j 1.2.15. However,
>> when I get a few lines of output on the console (I configured
>> log4j.properties that way), but then nothing. After debugging with logger
>> I get back from the LoggerFactory, it seems I get a NopLogger!
>>
>> How can I debug why I am getting this NopLogger?
>>
>> regards,
>>
>> Wim
>>
> 

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch



More information about the slf4j-user mailing list