Class LoggerLevel

Description

Defines the minimum set of levels recognized by the system, that is OFF, FATAL, ERROR, WARN, INFO, DEBUG and ALL.

The LoggerLevel class may be subclassed to define a larger level set.

  • version: $Revision: 1230524 $
  • since: 0.5

Located in /LoggerLevel.php (line 34)


	
			
Class Constant Summary
 ALL = -2147483647
 DEBUG = 10000
 ERROR = 40000
 FATAL = 50000
 INFO = 20000
 OFF = 2147483647
 TRACE = 5000
 WARN = 30000
Variable Summary
static mixed $levelMap
mixed $level
mixed $levelStr
Method Summary
static LoggerLevel toLevel (mixed $arg, [ $defaultLevel = null], LoggerLevel $default)
LoggerLevel __construct (integer $level, string $levelStr, integer $syslogEquivalent)
boolean equals (LoggerLevels $other)
integer getSyslogEquivalent ()
boolean isGreaterOrEqual (LoggerLevel $other)
integer toInt ()
string toString ()
string __toString ()
Variables
static mixed $levelMap (line 49)

Contains a list of instantiated levels.

  • access: private
mixed $level (line 46)

Integer level value.

  • access: private
mixed $levelStr (line 52)

String representation of the level.

  • access: private
integer $syslogEquivalent (line 58)

Equivalent syslog level.

  • access: private
Methods
static getLevelAll (line 170)

Returns an All Level

  • access: public
static LoggerLevel getLevelAll ()
static getLevelDebug (line 148)

Returns a Debug Level

  • access: public
static LoggerLevel getLevelDebug ()
static getLevelError (line 115)

Returns an Error Level

  • access: public
static LoggerLevel getLevelError ()
static getLevelFatal (line 104)

Returns a Fatal Level

  • access: public
static LoggerLevel getLevelFatal ()
static getLevelInfo (line 137)

Returns an Info Level

  • access: public
static LoggerLevel getLevelInfo ()
static getLevelOff (line 93)

Returns an Off Level

  • access: public
static LoggerLevel getLevelOff ()
static getLevelTrace (line 159)

Returns a Trace Level

  • access: public
static LoggerLevel getLevelTrace ()
static getLevelWarn (line 126)

Returns a Warn Level

  • access: public
static LoggerLevel getLevelWarn ()
static toLevel (line 229)

Convert the input argument to a level. If the conversion fails, then this method returns the provided default level.

  • access: public
static LoggerLevel toLevel (mixed $arg, [ $defaultLevel = null], LoggerLevel $default)
  • mixed $arg: The value to convert to level.
  • LoggerLevel $default: Value to return if conversion is not possible.
  • $defaultLevel
Constructor __construct (line 67)

Constructor

  • access: private
LoggerLevel __construct (integer $level, string $levelStr, integer $syslogEquivalent)
  • integer $level
  • string $levelStr
  • integer $syslogEquivalent
equals (line 79)

Compares two logger levels.

  • access: public
boolean equals (LoggerLevels $other)
  • LoggerLevels $other
getSyslogEquivalent (line 181)

Return the syslog equivalent of this priority as an integer.

  • access: public
integer getSyslogEquivalent ()
isGreaterOrEqual (line 193)

Returns true if this level has a higher or equal level than the level passed as argument, false otherwise.

  • access: public
boolean isGreaterOrEqual (LoggerLevel $other)
toInt (line 217)

Returns the integer representation of this level.

  • access: public
integer toInt ()
toString (line 201)

Returns the string representation of this level.

  • access: public
string toString ()
__toString (line 209)

Returns the string representation of this level.

  • access: public
string __toString ()
Class Constants
ALL = -2147483647 (line 43)
DEBUG = 10000 (line 41)
ERROR = 40000 (line 38)
FATAL = 50000 (line 37)
INFO = 20000 (line 40)
OFF = 2147483647 (line 36)
TRACE = 5000 (line 42)
WARN = 30000 (line 39)

Documentation generated on Sat, 18 Feb 2012 22:32:25 +0000 by phpDocumentor 1.4.3