Packageorg.as3commons.logging.setup
Classpublic final class HierarchicalSetup
InheritanceHierarchicalSetup Inheritance Object
Implements ILogSetup

Since : 2.7

Heritance based setup process much like log4j.

Much like a log4j setup this setup allows hierarchical defininition of loggers. It allows the definition of a target and level per hierarchy level and automatically pass it to all sublevels.

The setup allows to define a "threshold", a global maximal LogLevel. This allows to switch off the setup with a simple flag.



Public Properties
 PropertyDefined By
  threshold : LogSetupLevel
[write-only] Global threshold that limits the output levels.
HierarchicalSetup
Public Methods
 MethodDefined By
  
HierarchicalSetup(levelSeparator:String = ., threshold:LogSetupLevel = null)
Creates a new HierarchicalSetup
HierarchicalSetup
  
applyTo(logger:Logger):void
Sets targets of the passed-in Logger to the ones desired by the setup.
HierarchicalSetup
  
setHierarchy(path:String = null, target:ILogTarget = null, level:LogSetupLevel = null, additive:Boolean = true):void
Sets the properties of one hierarchy level
HierarchicalSetup
Property Detail
thresholdproperty
threshold:LogSetupLevel  [write-only]

Global threshold that limits the output levels.


Implementation
    public function set threshold(value:LogSetupLevel):void
Constructor Detail
HierarchicalSetup()Constructor
public function HierarchicalSetup(levelSeparator:String = ., threshold:LogSetupLevel = null)

Creates a new HierarchicalSetup

Parameters
levelSeparator:String (default = .) — Seperator for the levels in our hierarchy (as loggers just have names)
 
threshold:LogSetupLevel (default = null) — Global threshold that limits the output level.
Method Detail
applyTo()method
public function applyTo(logger:Logger):void

Sets targets of the passed-in Logger to the ones desired by the setup.

The setup should fill the desired targets to the Logger instances created by LoggerFactory.

Parameters

logger:LoggerLogger to be augmented by the setup

setHierarchy()method 
public function setHierarchy(path:String = null, target:ILogTarget = null, level:LogSetupLevel = null, additive:Boolean = true):void

Sets the properties of one hierarchy level

Parameters

path:String (default = null) — Hierarchy path, unseparated.
 
target:ILogTarget (default = null) — Target to be used for logging in this hierarchy and subhierarchies.
 
level:LogSetupLevel (default = null) — Level to be used from this hierarchy on, if not given, the parent level will be used
 
additive:Boolean (default = true) — Flat to set if the hierarchy level should merge the target with the parent targets or not.