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.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.slf4j.bridge.SLF4JBridgeHandler;
|
||||||
|
|
||||||
public class PortMapperStarter {
|
public class PortMapperStarter {
|
||||||
|
|
||||||
private final static Logger LOG = LoggerFactory.getLogger(PortMapperStarter.class);
|
private final static Logger LOG = LoggerFactory.getLogger(PortMapperStarter.class);
|
||||||
|
|
||||||
public static void main(final String[] args) {
|
public static void main(final String[] args) {
|
||||||
|
redirectJavaUtilLoggingToLogback();
|
||||||
final PortMapperCli cli = new PortMapperCli();
|
final PortMapperCli cli = new PortMapperCli();
|
||||||
try {
|
try {
|
||||||
cli.start(args);
|
cli.start(args);
|
||||||
|
@ -16,4 +18,9 @@ public class PortMapperStarter {
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void redirectJavaUtilLoggingToLogback() {
|
||||||
|
SLF4JBridgeHandler.removeHandlersForRootLogger();
|
||||||
|
SLF4JBridgeHandler.install();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue