force netty to use Log4J logger implementation

This commit is contained in:
Eugene Zhuravlev
2014-10-31 22:23:09 +01:00
parent aa8b6d221f
commit 9a9bfe7a5f
@@ -27,6 +27,8 @@ import io.netty.handler.codec.protobuf.ProtobufDecoder;
import io.netty.handler.codec.protobuf.ProtobufEncoder;
import io.netty.handler.codec.protobuf.ProtobufVarint32FrameDecoder;
import io.netty.handler.codec.protobuf.ProtobufVarint32LengthFieldPrepender;
import io.netty.util.internal.logging.InternalLoggerFactory;
import io.netty.util.internal.logging.Log4JLoggerFactory;
import org.apache.log4j.Level;
import org.apache.log4j.LogManager;
import org.apache.log4j.xml.DOMConfigurator;
@@ -329,6 +331,7 @@ public class BuildMain {
}
Logger.setFactory(MyLoggerFactory.class);
InternalLoggerFactory.setDefaultFactory(new Log4JLoggerFactory());
}
private static void ensureLogConfigExists(final File logConfig) throws IOException {