Class LoggerHierarchy

(line 43)

Located in File: Program_Root/LoggerHierarchy.php


This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy.

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.


Class Variable Summary
$debug
Default Value: ->false<-
$defaultFactory
Default Value: -><-
$emittedNoAppenderWarning
Default Value: ->false<-
$emittedNoResourceBundleWarning
Default Value: ->false<-
$ht
Default Value: ->array()<-
$parser
Default Value: ->null<-
$root
Default Value: ->null<-
$threshold
Default Value: ->LOGGER_LEVEL_ALL<-

Inherited Class Variable Summary

Method Summary
void constructor LoggerHierarchy ( $root )
Create a new logger hierarchy.
void addHierarchyEventListener ( $listener )
Add a HierarchyEventListener event to the repository.
void addRenderer ( $classToRender, $or )
Add an object renderer for a specific class.
void clear ( )
This call will clear all logger definitions from the internal hashtable.
void emitNoAppenderWarning ( $cat )
void exists ( $name )
Check if the named logger exists in the hierarchy.
void fireAddAppenderEvent ( $logger, $appender )
void getCurrentCategories ( )
void getCurrentLoggers ( )
Returns all the currently defined categories in this hierarchy as an Enumeration.
instance &getLogger ( $name )
Return a new logger instance named as the first parameter using the default factory.
void &getParser ( )
void getRendererMap ( )
Get the renderer map for this hierarchy.
void &getRootLogger ( )
Get the root of this hierarchy.
void getThreshold ( )
Returns a Level representation of the enable state.
void isDisabled ( $level )
This method will return true if this repository is disabled for level object passed as parameter and false otherwise.
void overrideAsNeeded ( $override )
void resetConfiguration ( )
Reset all values contained in this hierarchy instance to their default.
void setDisableOverride ( $override )
void setRenderer ( $renderedClass, $renderer )
Used by subclasses to add a renderer to the hierarchy passed as parameter.
void setThreshold ( $l )
set a new threshold level
void shutdown ( )
Shutting down a hierarchy will safely close and remove all appenders in all categories including the root logger
Inherited Method Summary

Method Detail

Constructor LoggerHierarchy

(line 95)

void LoggerHierarchy( object $root)

Create a new logger hierarchy.
Function Parameters:
- object $root: the root logger
Function Info:

[ Top ]


addHierarchyEventListener

(line 107)

void addHierarchyEventListener( mixed $listener)

Add a HierarchyEventListener event to the repository.

Not Yet Impl.

Function Info:

[ Top ]


addRenderer

(line 116)

void addRenderer( mixed $classToRender, mixed $or)

Add an object renderer for a specific class.

Not Yet Impl.

Function Info:

[ Top ]


clear

(line 124)

void clear( )

This call will clear all logger definitions from the internal hashtable.
Function Info:

[ Top ]


emitNoAppenderWarning

(line 130)

void emitNoAppenderWarning( mixed $cat)


Function Info:

[ Top ]


exists

(line 138)

void exists( mixed $name)

Check if the named logger exists in the hierarchy.
Function Info:

[ Top ]


fireAddAppenderEvent

(line 143)

void fireAddAppenderEvent( mixed $logger, mixed $appender)


Function Info:

[ Top ]


getCurrentCategories

(line 151)

void getCurrentCategories( )


Function Info:
deprecated - Please use getCurrentLoggers() instead.

[ Top ]


getCurrentLoggers

(line 159)

void getCurrentLoggers( )

Returns all the currently defined categories in this hierarchy as an Enumeration.
Function Info:

[ Top ]


getLogger

(line 170)

instance &getLogger( string $name)

Return a new logger instance named as the first parameter using the default factory.
Function Parameters:
- string $name: logger name
Function Info:
return - Logger

[ Top ]


getParser

(line 209)

void &getParser( )


Function Info:

[ Top ]


getRendererMap

(line 219)

void getRendererMap( )

Get the renderer map for this hierarchy.
Function Info:

[ Top ]


getRootLogger

(line 227)

void &getRootLogger( )

Get the root of this hierarchy.
Function Info:

[ Top ]


getThreshold

(line 237)

void getThreshold( )

Returns a Level representation of the enable state.
Function Info:

[ Top ]


isDisabled

(line 245)

void isDisabled( mixed $level)

This method will return true if this repository is disabled for level object passed as parameter and false otherwise.
Function Info:

[ Top ]


overrideAsNeeded

(line 253)

void overrideAsNeeded( mixed $override)


Function Info:
deprecated - Deprecated with no replacement.

[ Top ]


resetConfiguration

(line 261)

void resetConfiguration( )

Reset all values contained in this hierarchy instance to their default.
Function Info:

[ Top ]


setDisableOverride

(line 273)

void setDisableOverride( mixed $override)


Function Info:
deprecated - Deprecated with no replacement.

[ Top ]


setRenderer

(line 281)

void setRenderer( mixed $renderedClass, mixed $renderer)

Used by subclasses to add a renderer to the hierarchy passed as parameter.
Function Info:

[ Top ]


setThreshold

(line 292)

void setThreshold( mixed $l, integer $i)

set a new threshold level
Function Parameters:
- integer $i:
Function Info:

[ Top ]


shutdown

(line 300)

void shutdown( )

Shutting down a hierarchy will safely close and remove all appenders in all categories including the root logger
Function Info:

[ Top ]



Variable Detail

$debug

(line 54)
Data type: boolean

[ Top ]

$defaultFactory

(line 48)
Data type: currently

[ Top ]

$emittedNoAppenderWarning

(line 75)
Data type: boolean

[ Top ]

$emittedNoResourceBundleWarning

(line 80)
Data type: boolean

[ Top ]

$ht

(line 59)
Data type: array

[ Top ]

$parser

(line 85)
Data type: instance

[ Top ]

$root

(line 64)
Data type: instance

[ Top ]

$threshold

(line 70)
Data type: integer

[ Top ]



Documention generated on Thu, 20 Feb 2003 15:43:05 +0100 by phpDocumentor 1.2.0rc1