Package org.apache.log4j.spi
Interface LoggerRepository
-
@Deprecated(since="2022-01-27") public interface LoggerRepository
Deprecated.Apache Log4j 1 has reached end of life in 2015 and is no longer supported.ALoggerRepository
is used to create and retrieveLoggers
. The relation between loggers in a repository depends on the repository but typically loggers are arranged in a named hierarchy.In addition to the creational methods, a
LoggerRepository
can be queried for existing loggers, can act as a point of registry for events related to loggers.- Since:
- 1.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addHierarchyEventListener(HierarchyEventListener listener)
Deprecated.Add aHierarchyEventListener
event to the repository.void
emitNoAppenderWarning(Category cat)
Deprecated.Logger
exists(java.lang.String name)
Deprecated.void
fireAddAppenderEvent(Category logger, Appender appender)
Deprecated.java.util.Enumeration
getCurrentCategories()
Deprecated.Deprecated.java.util.Enumeration
getCurrentLoggers()
Deprecated.Logger
getLogger(java.lang.String name)
Deprecated.Logger
getLogger(java.lang.String name, LoggerFactory factory)
Deprecated.Logger
getRootLogger()
Deprecated.Level
getThreshold()
Deprecated.Get the repository-wide threshold.boolean
isDisabled(int level)
Deprecated.Returns whether this repository is disabled for a given level.void
resetConfiguration()
Deprecated.void
setThreshold(java.lang.String val)
Deprecated.Another form ofsetThreshold(Level)
accepting a string parameter instead of aLevel
.void
setThreshold(Level level)
Deprecated.Set the repository-wide threshold.void
shutdown()
Deprecated.
-
-
-
Method Detail
-
addHierarchyEventListener
void addHierarchyEventListener(HierarchyEventListener listener)
Deprecated.Add aHierarchyEventListener
event to the repository.
-
isDisabled
boolean isDisabled(int level)
Deprecated.Returns whether this repository is disabled for a given level. The answer depends on the repository threshold and thelevel
parameter. See alsosetThreshold(org.apache.log4j.Level)
method.
-
setThreshold
void setThreshold(Level level)
Deprecated.Set the repository-wide threshold. All logging requests below the threshold are immediately dropped. By default, the threshold is set toLevel.ALL
which has the lowest possible rank.
-
setThreshold
void setThreshold(java.lang.String val)
Deprecated.Another form ofsetThreshold(Level)
accepting a string parameter instead of aLevel
.
-
emitNoAppenderWarning
void emitNoAppenderWarning(Category cat)
Deprecated.
-
getThreshold
Level getThreshold()
Deprecated.Get the repository-wide threshold. SeesetThreshold(Level)
for an explanation.
-
getLogger
Logger getLogger(java.lang.String name)
Deprecated.
-
getLogger
Logger getLogger(java.lang.String name, LoggerFactory factory)
Deprecated.
-
getRootLogger
Logger getRootLogger()
Deprecated.
-
exists
Logger exists(java.lang.String name)
Deprecated.
-
shutdown
void shutdown()
Deprecated.
-
getCurrentLoggers
java.util.Enumeration getCurrentLoggers()
Deprecated.
-
getCurrentCategories
java.util.Enumeration getCurrentCategories()
Deprecated.Deprecated. Please usegetCurrentLoggers()
instead.
-
resetConfiguration
void resetConfiguration()
Deprecated.
-
-