Class InternalLoggerFactory

java.lang.Object
io.netty.util.internal.logging.InternalLoggerFactory
Direct Known Subclasses:
CommonsLoggerFactory, JdkLoggerFactory, Log4J2LoggerFactory, Log4JLoggerFactory, Slf4JLoggerFactory

public abstract class InternalLoggerFactory extends Object
Creates an InternalLogger or changes the default factory implementation. This factory allows you to choose what logging framework Netty should use. The default factory is Slf4JLoggerFactory. If SLF4J is not available, Log4JLoggerFactory is used. If Log4J is not available, JdkLoggerFactory is used. You can change it to your preferred logging framework before other Netty classes are loaded:
 InternalLoggerFactory.setDefaultFactory(Log4JLoggerFactory.INSTANCE);
 
Please note that the new default factory is effective only for the classes which were loaded after the default factory is changed. Therefore, setDefaultFactory(InternalLoggerFactory) should be called as early as possible and shouldn't be called more than once.