public class Log4jLoggerFactory extends AbstractLoggerAdapter<org.slf4j.Logger> implements org.slf4j.ILoggerFactory
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
FQCN |
private static java.lang.String |
PACKAGE |
private static java.lang.String |
TO_SLF4J_CONTEXT |
registry| Constructor and Description |
|---|
Log4jLoggerFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected LoggerContext |
getContext()
Gets the
LoggerContext that should be used to look up or create loggers. |
protected org.slf4j.Logger |
newLogger(java.lang.String name,
LoggerContext context)
Creates a new named logger for a given
LoggerContext. |
private LoggerContext |
validateContext(LoggerContext context) |
close, contextShutdown, getContext, getLogger, getLoggerContexts, getLoggersInContextprivate static final java.lang.String FQCN
private static final java.lang.String PACKAGE
private static final java.lang.String TO_SLF4J_CONTEXT
protected org.slf4j.Logger newLogger(java.lang.String name,
LoggerContext context)
AbstractLoggerAdapterLoggerContext.newLogger in class AbstractLoggerAdapter<org.slf4j.Logger>name - the name of the logger to createcontext - the LoggerContext this logger will be associated withprotected LoggerContext getContext()
AbstractLoggerAdapterLoggerContext that should be used to look up or create loggers. This is similar in spirit to the
ContextSelector class in log4j-core. However, implementations can rely on their own framework's
separation of contexts instead (or simply use a singleton).getContext in class AbstractLoggerAdapter<org.slf4j.Logger>LogManager.getContext(ClassLoader, boolean),
LogManager.getContext(String, boolean)private LoggerContext validateContext(LoggerContext context)