commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <>
Subject Re: [logging] setLevel in Jkd14Logger
Date Mon, 12 Apr 2004 17:25:07 GMT
Peter B. West wrote:

> SimpleLog has getLevel and setLevel methods, but Jdk14Logger does not. 
> The underlying Logger supports these methods, but it seems on first 
> inspection that I can only modify the logging level on an existing 
> instance by "knowing" that I am running a 1.4 Logger, getting the 
> native Logger instance, and setting the level on that.
> Is this the case?  If so, should the Log interface include getLevel 
> and setLevel, possibly returning null and false respectively when the 
> underlying implementation does not support level setting?
The commons-logger package is designed to be an adapter on the actual 
logging calls to the underlying logging implementation, not the 
configuration.  It is expected that, if you are using JDK 1.4 logging, 
then you must use the standard configuration mechanisms for setting up 
loggers and logging levels.  Likewise, if you're using Log4J, you would 
use a file.

The only reason that SimpleLog has a setLevel method is that it, itself, 
*is* a simple :-) logging implementation so that you can use c-l out of 
the box.  But configuring any sophisticated logging environment is out 
of scope for c-l.


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

View raw message