[logback-user] Questions about SLF4JBridgeHandler
cowwoc
cowwoc at bbs.darktech.org
Mon Jan 30 22:44:20 CET 2012
Hi,
I've got three questions:
1. http://www.slf4j.org/legacy.html mentions LevelChangePropagator but
http://www.slf4j.org/api/org/slf4j/bridge/SLF4JBridgeHandler.html does not.
Is it possible to add this to the Javadoc?
2. Why doesn't SLF4JBridgeHandler.install() register the listener
automatically?
3. I've noticed that invoking SLF4JBridgeHandler.install() is not enough.
You must remove any existing JUL handlers using:
java.util.logging.Logger rootLogger =
java.util.logging.LogManager.getLogManager().getLogger("");
java.util.logging.Handler[] handlers = rootLogger.getHandlers();
for (int i = 0; i < handlers.length; i++) {
rootLogger.removeHandler(handlers[i]);
}
before invoking SLF4JBridgeHandler.install(). Shouldn't SLF4JBridgeHandler
offer a method for doing it on behalf of the user?
Thanks,
Gili
--
View this message in context: http://old.nabble.com/Questions-about-SLF4JBridgeHandler-tp33221503p33221503.html
Sent from the Logback User mailing list archive at Nabble.com.
More information about the Logback-user
mailing list