Packageorg.as3commons.logging.setup
Classpublic final class WrapperRegExpSetup
InheritanceWrapperRegExpSetup Inheritance Object
Implements ILogSetup

Since : 2.6

WrapperRegExpSetup allows regular ILogSetup implementations to be just executed if a the name and/or the person of the logger that should be "set-up" to match a regular expression.



Public Methods
 MethodDefined By
  
WrapperRegExpSetup(target:ILogSetup, nameRule:RegExp = null, personRule:RegExp = null)
Constructs a new WrapperRegExpSetup that applies a setup just if it matches to the passed-in rules.
WrapperRegExpSetup
  
applyTo(logger:Logger):void
Sets targets of the passed-in Logger to the ones desired by the setup.
WrapperRegExpSetup
Constructor Detail
WrapperRegExpSetup()Constructor
public function WrapperRegExpSetup(target:ILogSetup, nameRule:RegExp = null, personRule:RegExp = null)

Constructs a new WrapperRegExpSetup that applies a setup just if it matches to the passed-in rules.

You have to pass in either a rule for the person.

Parameters
target:ILogSetup — Setup that will be used given the rules match
 
nameRule:RegExp (default = null) — Rule to which the name has to match for the target to be applied
 
personRule:RegExp (default = null) — Rule to which the person has to match for the target to be applied

Throws
Error — if neighter a rule for name nor one for person will be passed in.
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