Class LoggerHierarchy
This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy. The logger hierarchy is dealing with the several Log-Levels Logger can have. From log4j website:
"A logger is said to be an ancestor of another logger if its name followed by a dot is a prefix of the descendant logger name. A logger is said to be a parent of a child logger if there are no ancestors between itself and the descendant logger."
Child Loggers do inherit their Log-Levels from their Ancestors. They can increase their Log-Level compared to their Ancestors, but they cannot decrease it.
The casual user does not have to deal with this class directly.
The structure of the logger hierarchy is maintained by the getLogger method. The hierarchy is such that children link to their parent but parents do not have any pointers to their children. Moreover, loggers can be instantiated in any order, in particular descendant before ancestor.
In case a descendant is created before a particular ancestor, then it creates a provision node for the ancestor and adds itself to the provision node. Other descendants of the same ancestor add themselves to the previously created provision node.
public
|
|
public
|
|
public
boolean
|
|
public
array
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
boolean
|
#
isDisabled(
Returns true if the hierarchy is disabled for given log level and false otherwise. |
public
|
|
public
|
|
public
|
|
public
|
protected
array
|
$loggers | array() |
#
Array holding all Logger instances. |
protected
RootLogger
|
$root |
|
#
The root logger. |
protected
|
$rendererMap |
|
#
The logger renderer map. |
protected
|
$threshold |
|
#
Main level threshold. Events with lower level will not be logged by any logger, regardless of it's configuration. |