Class Logger

Description

This class has been deprecated and replaced by the Logger subclass.

  • author: Marco Vassura
  • version: $Revision: 556801 $
  • see: Logger

Located in /Logger.php (line 44)


	
			
Direct descendents
Class Description
LoggerRoot The root logger.
Variable Summary
Method Summary
static Logger getLogger (string $name, [LoggerFactory $factory = null])
Logger __construct (string $name)
void addAppender (LoggerAppender $newAppender)
void assertLog ([bool $assertion = true], [string $msg = ''])
void debug (mixed $message, [mixed $caller = null])
void error (mixed $message, [mixed $caller = null])
void exists (string $name)
void fatal (mixed $message, [mixed $caller = null])
void forcedLog (string $fqcn, mixed $caller, LoggerLevel $level, mixed $message)
boolean getAdditivity ()
array getAllAppenders ()
Logger getInstance ( $name)
string getName ()
void getPriority ()
void getResourceBundleString ( $key)
void info (mixed $message, [mixed $caller = null])
void isAttached (LoggerAppender $appender)
boolean isDebugEnabled ()
boolean isEnabledFor (LoggerLevel $level)
boolean isInfoEnabled ()
void l7dlog ( $priority,  $key,  $params,  $t)
void log (LoggerLevel $priority, mixed $message, [mixed $caller = null])
void removeAppender (mixed $appender)
void setAdditivity (boolean $additive)
void setHierarchy (LoggerHierarchy $repository)
void setLevel (LoggerLevel $level)
void setParent ( $logger)
void setPriority ( $priority)
void setResourceBundle ( $bundle)
void shutdown ()
void warn (mixed $message, [mixed $caller = null])
Variables
array $aai = array() (line 82)
boolean $additive = true (line 51)

Additivity is set to true by default, that is children inherit the appenders of their ancestors by default.

  • access: protected
string $fqcn = 'LoggerCategory' (line 56)
  • var: fully qualified class name
  • access: protected
LoggerLevel $level = null (line 61)
  • var: The assigned level of this category.
string $name = '' (line 66)
  • var: name of this category.
  • access: protected

Redefined in descendants as:
Logger $parent = null (line 71)
  • var: The parent of this category.
  • access: protected

Redefined in descendants as:
LoggerHierarchy $repository = null (line 76)
  • var: the object repository
Methods
static method getLogger (line 322)

Get a Logger by name (Delegate to LoggerManager)

  • access: public
static Logger getLogger (string $name, [LoggerFactory $factory = null])
static method getRootLogger (line 393)

get the Root Logger (Delegate to LoggerManager)

  • access: public
static LoggerRoot getRootLogger ()
Constructor __construct (line 93)

Constructor.

  • access: public
Logger __construct (string $name)
  • string $name: Category name

Redefined in descendants as:
addAppender (line 103)

Add a new Appender to the list of appenders of this Category instance.

  • access: public
void addAppender (LoggerAppender $newAppender)
assertLog (line 115)

If assertion parameter is false, then logs msg as an error statement.

  • access: public
void assertLog ([bool $assertion = true], [string $msg = ''])
  • bool $assertion
  • string $msg: message to log
callAppenders (line 127)

Call the appenders in the hierarchy starting at this.

  • access: public
void callAppenders (LoggerLoggingEvent $event)
debug (line 145)

Log a message object with the DEBUG level including the caller.

  • access: public
void debug (mixed $message, [mixed $caller = null])
  • mixed $message: message
  • mixed $caller: caller object or caller string id
error (line 162)

Log a message object with the ERROR level including the caller.

  • access: public
void error (mixed $message, [mixed $caller = null])
  • mixed $message: message
  • mixed $caller: caller object or caller string id
exists (line 180)

Deprecated. Please use LoggerManager::exists() instead.

void exists (string $name)
  • string $name
fatal (line 191)

Log a message object with the FATAL level including the caller.

  • access: public
void fatal (mixed $message, [mixed $caller = null])
  • mixed $message: message
  • mixed $caller: caller object or caller string id
forcedLog (line 214)

This method creates a new logging event and logs the event without further checks.

It should not be called directly. Use info(), debug(), warn(), error() and fatal() wrappers.

void forcedLog (string $fqcn, mixed $caller, LoggerLevel $level, mixed $message)
  • string $fqcn: Fully Qualified Class Name of the Logger
  • mixed $caller: caller object or caller string id
  • LoggerLevel $level: log level
  • mixed $message: message
getAdditivity (line 224)

Get the additivity flag for this Category instance.

  • access: public
boolean getAdditivity ()
getAllAppenders (line 233)

Get the appenders contained in this category as an array.

  • return: collection of appenders
  • access: public
array getAllAppenders ()
getAppender (line 242)

Look for the appender named as name.

  • access: public
LoggerAppender getAppender ( $name)
  • $name
getChainedPriority (line 251)

Please use the getEffectiveLevel() method instead.

  • deprecated:
  • access: public
void getChainedPriority ()
getCurrentCategories (line 260)

Please use LoggerManager::getCurrentLoggers() instead.

  • deprecated:
  • access: public
void getCurrentCategories ()
getDefaultHierarchy (line 269)

Please use LoggerManager::getLoggerRepository() instead.

  • deprecated:
  • access: public
void getDefaultHierarchy ()
getEffectiveLevel (line 288)

Starting from this category, search the category hierarchy for a non-null level and return it.

LoggerLevel getEffectiveLevel ()
getHierarchy (line 278)
LoggerHierarchy getHierarchy ()
getInstance (line 301)

Retrieve a category with named as the name parameter.

  • access: public
Logger getInstance ( $name)
  • $name
getLevel (line 310)

Returns the assigned Level, if any, for this Category.

  • return: or null
  • access: public
LoggerLevel getLevel ()
getLoggerRepository (line 331)

Return the the repository where this Category is attached.

  • access: public
LoggerHierarchy getLoggerRepository ()
getName (line 340)

Return the category name.

  • access: public
string getName ()
getParent (line 349)

Returns the parent of this category.

  • access: public
Logger getParent ()
getPriority (line 358)

Please use getLevel() instead.

  • deprecated:
  • access: public
void getPriority ()
getResourceBundle (line 366)

Return the inherited ResourceBundle for this category.

  • access: public
void getResourceBundle ()
getResourceBundleString (line 374)

Returns the string resource corresponding to key in this category's inherited resource bundle.

  • access: public
void getResourceBundleString ( $key)
  • $key
getRoot (line 383)

Return the root of the default category hierarchy.

  • access: public
LoggerRoot getRoot ()
info (line 404)

Log a message object with the INFO Level.

  • access: public
void info (mixed $message, [mixed $caller = null])
  • mixed $message: message
  • mixed $caller: caller object or caller string id
isAttached (line 420)

Is the appender passed as parameter attached to this category?

  • access: public
void isAttached (LoggerAppender $appender)
isDebugEnabled (line 429)

Check whether this category is enabled for the DEBUG Level.

  • access: public
boolean isDebugEnabled ()
isEnabledFor (line 444)

Check whether this category is enabled for a given Level passed as parameter.

  • access: public
boolean isEnabledFor (LoggerLevel $level)
isInfoEnabled (line 457)

Check whether this category is enabled for the info Level.

boolean isInfoEnabled ()
l7dlog (line 469)

Log a localized and parameterized message.

  • access: public
void l7dlog ( $priority,  $key,  $params,  $t)
  • $priority
  • $key
  • $params
  • $t
log (line 481)

This generic form is intended to be used by wrappers.

  • access: public
void log (LoggerLevel $priority, mixed $message, [mixed $caller = null])
  • LoggerLevel $priority: a valid level
  • mixed $message: message
  • mixed $caller: caller object or caller string id
removeAllAppenders (line 494)

Remove all previously added appenders from this Category instance.

  • access: public
void removeAllAppenders ()
removeAppender (line 508)

Remove the appender passed as parameter form the list of appenders.

  • access: public
void removeAppender (mixed $appender)
setAdditivity (line 524)

Set the additivity flag for this Category instance.

  • access: public
void setAdditivity (boolean $additive)
  • boolean $additive
setHierarchy (line 544)

Only the Hierarchy class can set the hierarchy of a category.

  • access: public
void setHierarchy (LoggerHierarchy $repository)
setLevel (line 554)

Set the level of this Category.

  • access: public
void setLevel (LoggerLevel $level)
  • LoggerLevel $level: a level string or a level constant

Redefined in descendants as:
  • LoggerRoot::setLevel() : Setting a null value to the level of the root category may have catastrophic results.
setParent (line 559)
  • access: public
void setParent ( $logger)
  • $logger

Redefined in descendants as:
setPriority (line 533)
void setPriority ( $priority)
  • $priority

Redefined in descendants as:
setResourceBundle (line 568)

Set the resource bundle to be used with localized logging methods

  • access: public
void setResourceBundle ( $bundle)
  • $bundle
shutdown (line 577)
void shutdown ()
warn (line 588)

Log a message with the WARN level.

  • access: public
void warn (mixed $message, [mixed $caller = null])
  • mixed $message: message
  • mixed $caller: caller object or caller string id

Documentation generated by phpDocumentor 1.3.2