[logback-user] Trouble with Logback / JUL configuration

Ceki Gulcu ceki at qos.ch
Wed Jun 17 15:21:53 CEST 2009


Thanks for the feedback and sharing your code. You can accomplish the same with 
less:

     java.util.logging.Logger logger = java.util.logging.Logger.getLogger("");
     logger.setLevel(java.util.logging.Level.FINEST);

HTH,

Flavio Donzé wrote:
> Hi Ceki
> 
> Thanks for your reply, here how I solved it:
> 
> URL logging = context.getBundle().getResource("logging.properties");
> if (logging == null) {
> 	throw new IOException("logging.properties not found in
> com.softmodeler.osgi.over.slf4j");
> }
> InputStream inputStream = logging.openStream();
> LogManager.getLogManager().readConfiguration(inputStream);
> 
> SLF4JBridgeHandler.install();
> 
> The loaded logging.properties contains only one line: .level= FINEST
> Now I get all the messages over logback, JUL does not print anything.
> 
> Cheers
> flavio
> 
> -----
> Flavio Donzé
> Software Engineer
> My Blog:  http://swissdev.blogspot.com/

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


More information about the Logback-user mailing list