Hi there.<br><br>Quick question: is there a way to remove all existing JUL handlers and install the SLF4JBridgeHandler, all via a configuration file such as logback.xml, etc.?<br><br>Currently I do the following programmatically, but I would like to be able to do this via a configuration file instead:<br>
<br><br><span style="font-family:courier new,monospace"> // Remove any existing handlers from JUL's root logger.</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> java.util.logging.Logger julLogger =</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> java.util.logging.Logger.getLogger(JUL_ROOT_LOGGER_NAME);</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> Handler[] julHandlerArray = julLogger.getHandlers();</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> for ( Handler julHandler : julHandlerArray ) {</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> julLogger.removeHandler(julHandler);</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> }</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> // Install the JUL to SLF4J bridge handler.</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> SLF4JBridgeHandler.install();</span><br><br clear="all"><br>Any input would be greatly appreciated.<br><br>Thank you very much.<br><br>-- <br>Andrzej Zadorozny<br><br>
<br>