Questions about SLF4JBridgeHandler

View: New views
1 Messages — Rating Filter:   Alert me  

Questions about SLF4JBridgeHandler

by cowwoc :: Rate this Message:

| View Threaded | Show Only this Message

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