[logback-user] Trouble with Logback / JUL configuration

Flavio Donzé flavio.donze at gmail.com
Wed Jun 17 13:25:59 CEST 2009


Hallo everyone

 

I’m having some trouble with JUL logging and was wondering if somebody has
had the same issue or else a good solution.

 

My problem is that logback settings seem to be ignored by JUL. So if I have
the following example:

 

<logger name="test"><level value="debug"/></logger>

 

java.util.logging.Logger logger =
java.util.logging.Logger.getLogger(”test”);
logger.log(Level.FINEST, “finest”);
logger.log(Level.FINER, “finer”);
logger.log(Level.FINE, “fine”);
logger.log(Level.INFO, “info”);

 

Only the “info” will be logged. I found the following JavaDoc which is the
root of the problem:
 
<http://www.slf4j.org/api/org/slf4j/bridge/SLF4JBridgeHandler.html#install%2
8%29>
http://www.slf4j.org/api/org/slf4j/bridge/SLF4JBridgeHandler.html#install()
“This handler will redirect jul logging to SLF4J. However, only logs enabled
in j.u.l. will be redirected. For example, if a log statement invoking a
j.u.l. logger disabled that statement, by definition, will not reach any
SLF4JBridgeHandler instance and cannot be redirected”

 

Is there a solution or a workaround for this problem?

Like a logging.properties which enables everything on trace level?

 

Greets and thanks

flavio

 

 

-----

Flavio Donzé

Software Engineer

My Blog:  http://swissdev.blogspot.com/

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20090617/380f5fbf/attachment.htm>


More information about the Logback-user mailing list