Class Log_observer

Description

The Log_observer:: class implements the Observer end of a Subject-Observer pattern for watching log activity and taking actions on exceptional events.

  • example: example not found
  • since: Horde 1.3
  • since: Log 1.0
  • author: Chuck Hagenbuch <chuck@horde.org>

Located in /maintenance/libraries/pear/Log/observer.php (line 21)


	
			
Variable Summary
 integer $_id
 string $_priority
Method Summary
 Log_observer Log_observer ([integer $priority = PEAR_LOG_INFO])
 object The &factory (string $type, [integer $priority = PEAR_LOG_INFO], [array $conf = array()])
 void notify (array $event)
Variables
integer $_id = 0 (line 29)

Instance-specific unique identification number.

  • access: private
string $_priority = PEAR_LOG_INFO (line 40)

The minimum priority level of message that we want to hear about.

PEAR_LOG_EMERG is the highest priority, so we will only hear messages with an integer priority value less than or equal to ours. It defaults to PEAR_LOG_INFO, which listens to everything except PEAR_LOG_DEBUG.

  • access: private
Methods
Constructor Log_observer (line 50)

Creates a new basic Log_observer instance.

  • access: public
Log_observer Log_observer ([integer $priority = PEAR_LOG_INFO])
  • integer $priority: The highest priority at which to receive log event notifications.
factory (line 70)

Attempts to return a new concrete Log_observer instance of the requested type.

  • return: newly created concrete Log_observer instance, or an false on an error.
object The &factory (string $type, [integer $priority = PEAR_LOG_INFO], [array $conf = array()])
  • string $type: The type of concreate Log_observer subclass to return.
  • integer $priority: The highest priority at which to receive log event notifications.
  • array $conf: Optional associative array of additional configuration values.
notify (line 120)

This is a stub method to make sure that Log_Observer classes do

something when they are notified of a message. The default behavior is to just print the message, which is obviously not desireable in practically any situation - which is why you need to override this method. :)

void notify (array $event)
  • array $event: A hash describing the log event.

Documentation generated on Fri, 3 Dec 2004 12:27:04 +0000 by phpDocumentor 1.3.0RC3