InternalLoggers. This factory allows you to choose what logging framework Netty should use. The
default factory is Slf4JLoggerFactory. If SLF4J is not available, Log4J2LoggerFactory 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 via setDefaultFactory(InternalLoggerFactory). If you want to change
the logger factory, setDefaultFactory(InternalLoggerFactory) must be invoked before any other Netty classes
are loaded.
Note that setDefaultFactory(InternalLoggerFactory)} can not be invoked more than once.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | InternalLoggerFactory.
This class holds a reference to the |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static InternalLoggerFactory | getDefaultFactory()
Get the default factory that was either initialized automatically based on logging implementations on the
classpath, or set explicitly via |
| public static InternalLogger | |
| public static InternalLogger | |
| protected abstract InternalLogger | |
| public static void | setDefaultFactory(InternalLoggerFactory
a non-null implementation of defaultFactory)InternalLoggerFactorySet the default factory. |
| InternalLoggerFactory | back to summary |
|---|---|
| public InternalLoggerFactory() | |
| getDefaultFactory | back to summary |
|---|---|
| public static InternalLoggerFactory getDefaultFactory() Get the default factory that was either initialized automatically based on logging implementations on the
classpath, or set explicitly via | |
| getInstance | back to summary |
|---|---|
| public static InternalLogger getInstance(Class<?> clazz) Creates a new logger instance with the name of the specified class. | |
| getInstance | back to summary |
|---|---|
| public static InternalLogger getInstance(String name) Creates a new logger instance with the specified name. | |
| newInstance | back to summary |
|---|---|
| protected abstract InternalLogger newInstance(String name) Creates a new logger instance with the specified name. | |
| setDefaultFactory | back to summary |
|---|---|
| public static void setDefaultFactory(InternalLoggerFactory defaultFactory) Set the default factory. This method must be invoked before the default factory is initialized via
| |
InternalLoggerFactory. The raison d'être for this class is primarily
to aid in testing.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final InternalLoggerFactory. | |
| private final AtomicReference |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv InternalLoggerFactory | |
| pack-priv InternalLogger | |
| pack-priv InternalLogger | |
| private static InternalLoggerFactory | |
| pack-priv InternalLogger | |
| pack-priv void | |
| private static InternalLoggerFactory | |
| private static InternalLoggerFactory | |
| private static InternalLoggerFactory |
| HOLDER | back to summary |
|---|---|
| pack-priv static final InternalLoggerFactory. | |
| reference | back to summary |
|---|---|
| private final AtomicReference<InternalLoggerFactory> reference | |
| InternalLoggerFactoryHolder | back to summary |
|---|---|
| pack-priv InternalLoggerFactoryHolder() | |
| InternalLoggerFactoryHolder | back to summary |
|---|---|
| pack-priv InternalLoggerFactoryHolder(final InternalLoggerFactory delegate) | |
| getFactory | back to summary |
|---|---|
| pack-priv InternalLoggerFactory getFactory() | |
| getInstance | back to summary |
|---|---|
| pack-priv InternalLogger getInstance(final Class<?> clazz) | |
| getInstance | back to summary |
|---|---|
| pack-priv InternalLogger getInstance(final String name) | |
| newDefaultFactory | back to summary |
|---|---|
| private static InternalLoggerFactory newDefaultFactory(String name) | |
| newInstance | back to summary |
|---|---|
| pack-priv InternalLogger newInstance(String name) | |
| setFactory | back to summary |
|---|---|
| pack-priv void setFactory(final InternalLoggerFactory factory) | |
| useJdkLoggerFactory | back to summary |
|---|---|
| private static InternalLoggerFactory useJdkLoggerFactory(String name) | |
| useLog4J2LoggerFactory | back to summary |
|---|---|
| private static InternalLoggerFactory useLog4J2LoggerFactory(String name) | |
| useSlf4JLoggerFactory | back to summary |
|---|---|
| private static InternalLoggerFactory useSlf4JLoggerFactory(String name) | |