redirect java.util.logging to logback
parent
d9a5cde00a
commit
d9ae16952c
|
@ -2,12 +2,14 @@ package org.chris.portmapper;
|
|||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.slf4j.bridge.SLF4JBridgeHandler;
|
||||
|
||||
public class PortMapperStarter {
|
||||
|
||||
private final static Logger LOG = LoggerFactory.getLogger(PortMapperStarter.class);
|
||||
|
||||
public static void main(final String[] args) {
|
||||
redirectJavaUtilLoggingToLogback();
|
||||
final PortMapperCli cli = new PortMapperCli();
|
||||
try {
|
||||
cli.start(args);
|
||||
|
@ -16,4 +18,9 @@ public class PortMapperStarter {
|
|||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private static void redirectJavaUtilLoggingToLogback() {
|
||||
SLF4JBridgeHandler.removeHandlersForRootLogger();
|
||||
SLF4JBridgeHandler.install();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue