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 |
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 . |
close, getContext, getLogger, getLoggersInContext
private static final java.lang.String FQCN
private static final java.lang.String PACKAGE
protected org.slf4j.Logger newLogger(java.lang.String name, LoggerContext context)
AbstractLoggerAdapter
LoggerContext
.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()
AbstractLoggerAdapter
LoggerContext
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)