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 Summary | |
void |
addHierarchyEventListener(HierarchyEventListener listener)
Add a HierarchyEventListener event to the repository. |
void |
emitNoAppenderWarning(Category cat)
|
Logger |
exists(String name)
|
void |
fireAddAppenderEvent(Category logger,
Appender appender)
|
Enumeration |
getCurrentCategories()
Deprecated. Please use getCurrentLoggers() instead. |
Enumeration |
getCurrentLoggers()
|
Logger |
getLogger(String name)
|
Logger |
getLogger(String name,
LoggerFactory factory)
|
Logger |
getRootLogger()
|
Level |
getThreshold()
Get the repository-wide threshold. |
boolean |
isDisabled(int level)
Is the repository disabled for a given level? The answer depends on the repository threshold and the level
parameter. |
void |
resetConfiguration()
|
void |
setThreshold(Level level)
Set the repository-wide threshold. |
void |
setThreshold(String val)
Another form of setThreshold(Level) accepting a string
parameter instead of a Level . |
void |
shutdown()
|
Method Detail |
public void addHierarchyEventListener(HierarchyEventListener listener)
HierarchyEventListener
event to the repository.
public boolean isDisabled(int level)
level
parameter. See also setThreshold(org.apache.log4j.Level)
method.
public void setThreshold(Level level)
Level.ALL
which has the lowest possible rank.
public void setThreshold(String val)
setThreshold(Level)
accepting a string
parameter instead of a Level
.
public void emitNoAppenderWarning(Category cat)
public Level getThreshold()
setThreshold(Level)
for an explanation.
public Logger getLogger(String name)
public Logger getLogger(String name, LoggerFactory factory)
public Logger getRootLogger()
public Logger exists(String name)
public void shutdown()
public Enumeration getCurrentLoggers()
public Enumeration getCurrentCategories()
getCurrentLoggers()
instead.
public void fireAddAppenderEvent(Category logger, Appender appender)
public void resetConfiguration()
Copyright © 2000 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.