[slf4j-dev] [Bug 111] JUL-toSLF4J-Bridge missing FINE, FINER and FINEST messages
bugzilla-daemon at pixie.qos.ch
bugzilla-daemon at pixie.qos.ch
Thu Nov 20 16:02:37 CET 2008
http://bugzilla.slf4j.org/show_bug.cgi?id=111
--- Comment #3 from Ceki Gulcu <listid at qos.ch> 2008-11-20 16:02:37 ---
Hello again,
In revision 1244 committed a few minutes ago, the install and uninstall methods
have become:
/**
* Adds a SLF4JBridgeHandler instance to jul's root logger.
*
* <p>
* 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 <em>not</em>
reach
* any SLF4JBridgeHandler instance and cannot be redirected.
*/
public static void install() {
LogManager.getLogManager().getLogger("").addHandler(
new SLF4JBridgeHandler());
}
/**
* Removes previously installed SLF4JBridgeHandler instances. See also
* {@link #install()}.
*
* @throws SecurityException
* A <code>SecurityException</code> is thrown, if a security
* manager exists and if the caller does not have
* LoggingPermission("control").
*/
public static void uninstall() throws SecurityException {
java.util.logging.Logger rootLogger = LogManager.getLogManager().getLogger(
"");
Handler[] handlers = rootLogger.getHandlers();
for (int i = 0; i < handlers.length; i++) {
if (handlers[i] instanceof SLF4JBridgeHandler) {
rootLogger.removeHandler(handlers[i]);
}
}
}
Is this more amenable to your purposes?
--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the slf4j-dev
mailing list