FileDocCategorySizeDatePackage
LoggerRepository.javaAPI DocApache log4j 1.2.152973Sat Aug 25 00:09:40 BST 2007org.apache.log4j.spi

LoggerRepository

public interface LoggerRepository
A LoggerRepository is used to create and retrieve Loggers. 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.

author
Ceki Gülcü
since
1.2

Fields Summary
Constructors Summary
Methods Summary
public voidaddHierarchyEventListener(org.apache.log4j.spi.HierarchyEventListener listener)
Add a {@link HierarchyEventListener} event to the repository.

public voidemitNoAppenderWarning(org.apache.log4j.Category cat)

public abstract org.apache.log4j.Loggerexists(java.lang.String name)

public abstract voidfireAddAppenderEvent(org.apache.log4j.Category logger, org.apache.log4j.Appender appender)

public java.util.EnumerationgetCurrentCategories()
Deprecated. Please use {@link #getCurrentLoggers} instead.

public java.util.EnumerationgetCurrentLoggers()

public org.apache.log4j.LoggergetLogger(java.lang.String name)

public org.apache.log4j.LoggergetLogger(java.lang.String name, org.apache.log4j.spi.LoggerFactory factory)

public org.apache.log4j.LoggergetRootLogger()

public org.apache.log4j.LevelgetThreshold()
Get the repository-wide threshold. See {@link #setThreshold(Level)} for an explanation.

public booleanisDisabled(int level)
Returns whether this repository is disabled for a given level. The answer depends on the repository threshold and the level parameter. See also {@link #setThreshold} method.

public abstract voidresetConfiguration()

public voidsetThreshold(org.apache.log4j.Level level)
Set the repository-wide threshold. All logging requests below the threshold are immediately dropped. By default, the threshold is set to Level.ALL which has the lowest possible rank.

public voidsetThreshold(java.lang.String val)
Another form of {@link #setThreshold(Level)} accepting a string parameter instead of a Level.

public abstract voidshutdown()