Save This Page
Home » apache-log4j-1.2.15 » org.apache » log4j » spi » [javadoc | source]
org.apache.log4j.spi
public interface: LoggerRepository [javadoc | source]

All Known Implementing Classes:
    NOPLoggerRepository, Hierarchy

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.

Method from org.apache.log4j.spi.LoggerRepository Summary:
addHierarchyEventListener,   emitNoAppenderWarning,   exists,   fireAddAppenderEvent,   getCurrentCategories,   getCurrentLoggers,   getLogger,   getLogger,   getRootLogger,   getThreshold,   isDisabled,   resetConfiguration,   setThreshold,   setThreshold,   shutdown
Method from org.apache.log4j.spi.LoggerRepository Detail:
 public  void addHierarchyEventListener(HierarchyEventListener listener)
 public  void emitNoAppenderWarning(Category cat)
 abstract public Logger exists(String name)
 abstract public  void fireAddAppenderEvent(Category logger,
    Appender appender)
 public Enumeration getCurrentCategories()
 public Enumeration getCurrentLoggers()
 public Logger getLogger(String name)
 public Logger getLogger(String name,
    LoggerFactory factory)
 public Logger getRootLogger()
 public Level getThreshold()
 public boolean isDisabled(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 #setThreshold method.
 abstract public  void resetConfiguration()
 public  void setThreshold(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  void setThreshold(String val)
 abstract public  void shutdown()