Packageorg.as3commons.logging.setup
Classpublic final class LogSetupLevel
InheritanceLogSetupLevel Inheritance Object

Since : 2

LogSetupLevel, in contrary to the LogLevel, can is made to allow certain levels to be activated/deactivated.

Levels are defined by a integer value. Different values can be combined by using the .or() method.

var debugAndErrorOutput:LogSetupLevel = LogSetupLevel.DEBUG_ONLY.or(LogSetupLevel.ERROR_ONLY);

See also

org.as3commons.logging.setup.LevelTargetSetup


Public Methods
 MethodDefined By
  
LogSetupLevel(value:int)
Creates a new setup level instance.
LogSetupLevel
  
applyTo(logger:Logger, target:ILogTarget):void
Applies the passed-in target to the passed-in logger for all levels matching to this LogSetupLevel.
LogSetupLevel
  
[static] Returns a LogSetupLevel for the value.
LogSetupLevel
  
Combines this level with another one, allowing to output to either of both levels.
LogSetupLevel
  
valueOf():int
Value of this level.
LogSetupLevel
Public Constants
 ConstantDefined By
  ALL : LogSetupLevel
[static] Level that will log all statements.
LogSetupLevel
  DEBUG : LogSetupLevel
[static] Level that will log all statements.
LogSetupLevel
  DEBUG_ONLY : LogSetupLevel
[static] Level that will log just the debug statements.
LogSetupLevel
  ERROR : LogSetupLevel
[static] Level that will log the error or fatal statements.
LogSetupLevel
  ERROR_ONLY : LogSetupLevel
[static] Level that will log just the error statements.
LogSetupLevel
  FATAL : LogSetupLevel
[static] Level that will log just the fatal statements.
LogSetupLevel
  FATAL_ONLY : LogSetupLevel
[static] Level that will log just the fatal statements.
LogSetupLevel
  INFO : LogSetupLevel
[static] Level that will log the error, fatal, warn or info statements.
LogSetupLevel
  INFO_ONLY : LogSetupLevel
[static] Level that will log just the info statements.
LogSetupLevel
  NONE : LogSetupLevel
[static] Level that will not log any level.
LogSetupLevel
  WARN : LogSetupLevel
[static] Level that will log the error, fatal or warn statements.
LogSetupLevel
  WARN_ONLY : LogSetupLevel
[static] Level that will log just the warn statements.
LogSetupLevel
Constructor Detail
LogSetupLevel()Constructor
public function LogSetupLevel(value:int)

Creates a new setup level instance.

Parameters
value:int — Value of the log level.

Throws
Error — if the level for that value was already created before.
Method Detail
applyTo()method
public function applyTo(logger:Logger, target:ILogTarget):void

Applies the passed-in target to the passed-in logger for all levels matching to this LogSetupLevel.

Parameters

logger:LoggerLogger instance to receive the targets
 
target:ILogTargetILogTarget that should be used for the defined targets

getLevelByValue()method 
public static function getLevelByValue(value:int):LogSetupLevel

Returns a LogSetupLevel for the value.

Parameters

value:int — Value of the requested LogSetupLevel.

Returns
LogSetupLevelLogSetupLevel matching to the value.
or()method 
public function or(otherLevel:LogSetupLevel):LogSetupLevel

Combines this level with another one, allowing to output to either of both levels.

Parameters

otherLevel:LogSetupLevelLogSetupLevel that should be used.

Returns
LogSetupLevel — Resulting level that allows either of the levels.
valueOf()method 
public function valueOf():int

Value of this level.

Returns
int — level of this logger
Constant Detail
ALLConstant
public static const ALL:LogSetupLevel

Level that will log all statements.

DEBUGConstant 
public static const DEBUG:LogSetupLevel

Level that will log all statements.

DEBUG_ONLYConstant 
public static const DEBUG_ONLY:LogSetupLevel

Level that will log just the debug statements.

ERRORConstant 
public static const ERROR:LogSetupLevel

Level that will log the error or fatal statements.

ERROR_ONLYConstant 
public static const ERROR_ONLY:LogSetupLevel

Level that will log just the error statements.

FATALConstant 
public static const FATAL:LogSetupLevel

Level that will log just the fatal statements.

FATAL_ONLYConstant 
public static const FATAL_ONLY:LogSetupLevel

Level that will log just the fatal statements.

INFOConstant 
public static const INFO:LogSetupLevel

Level that will log the error, fatal, warn or info statements.

INFO_ONLYConstant 
public static const INFO_ONLY:LogSetupLevel

Level that will log just the info statements.

NONEConstant 
public static const NONE:LogSetupLevel

Level that will not log any level.

WARNConstant 
public static const WARN:LogSetupLevel

Level that will log the error, fatal or warn statements.

WARN_ONLYConstant 
public static const WARN_ONLY:LogSetupLevel

Level that will log just the warn statements.