commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cohen" <>
Subject DEBUG vs. TRACE under Log4JLogger
Date Wed, 01 Oct 2003 20:49:38 GMT
In commons-logging-1.0.3, it seems that the package has been configured
so that if a commons-logging Log4JLogger is in use, TRACE is treated
exactly as if the code said DEBUG.  This is true for isTraceEnabled() as

I may be remembering wrong, but I think I remember that in past versions
it didn't work that way.  In a Log4JLogger isTraceEnabled simply
returned FALSE and TRACE logging statements did nothing.

I actually have a use case where I would like commons-logging to
function that way. That use case is in JUnit testing where the JUnit
test runs under SimpleLogger, but when the application is deployed, it
uses log4j and I would like all the trace messages to be silent in that

However, this is not the way 1.0.3 works.  Contrary to my
expressed-in-code wishes to have two separate levels, it promotes my
TRACE statements to be DEBUG statements.

Is there some way to defeat this in commons-logging 1.0.3?  I don't seem
to find one in the docs.  I would like to have this "feature" be
configurable off.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message