Class LoggerLevel

Description

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

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

  • author: Marco Vassura
  • version: $Revision: 556784 $
  • since: 0.5

Located in /LoggerLevel.php (line 43)


	
			
Variable Summary
integer $level
string $levelStr
Method Summary
static void toLevel (mixed $arg, [ $defaultLevel = null], LoggerLevel $default)
LoggerLevel __construct (integer $level, string $levelStr, integer $syslogEquivalent)
boolean equals (object $o)
integer getSyslogEquivalent ()
integer toInt ()
string toString ()
Variables
integer $level (line 48)
  • access: public
string $levelStr (line 53)
  • access: public
integer $syslogEquivalent (line 58)
  • access: public
Methods
static method getLevelAll (line 166)

Returns an All Level

  • access: public
static LoggerLevel getLevelAll ()
static method getLevelDebug (line 154)

Returns a Debug Level

  • access: public
static LoggerLevel getLevelDebug ()
static method getLevelError (line 118)

Returns an Error Level

  • access: public
static LoggerLevel getLevelError ()
static method getLevelFatal (line 106)

Returns a Fatal Level

  • access: public
static LoggerLevel getLevelFatal ()
static method getLevelInfo (line 142)

Returns an Info Level

  • access: public
static LoggerLevel getLevelInfo ()
static method getLevelOff (line 94)

Returns an Off Level

  • access: public
static LoggerLevel getLevelOff ()
static method getLevelWarn (line 130)

Returns a Warn Level

  • access: public
static LoggerLevel getLevelWarn ()
static method toLevel (line 226)

Convert the string passed as argument to a level. If the conversion fails, then this method returns a DEBUG Level.

  • access: public
static void toLevel (mixed $arg, [ $defaultLevel = null], LoggerLevel $default)
Constructor __construct (line 67)

Constructor

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

Two priorities are equal if their level fields are equal.

  • access: public
boolean equals (object $o)
  • object $o
getSyslogEquivalent (line 178)

Return the syslog equivalent of this priority as an integer.

  • final:
  • access: public
integer getSyslogEquivalent ()
isGreaterOrEqual (line 194)

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

You should think twice before overriding the default implementation of isGreaterOrEqual method.

  • access: public
boolean isGreaterOrEqual (LoggerLevel $r)
toInt (line 213)

Returns the integer representation of this level.

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

Returns the string representation of this priority.

  • final:
  • access: public
string toString ()

Documentation generated by phpDocumentor 1.3.2