Log
[ class tree: Log ] [ index: Log ] [ all elements ]

Class: Log_composite

Source Location: /pear/Log/composite.php

Class Overview

Log
   |
   --Log_composite

The Log_composite:: class implements a Composite pattern which allows multiple Log implementations to receive the same events.


Author(s):

Methods


Inherited Methods

Class: Log

Log::alert()
A convenience function for logging an alert event. It will log a message at the PEAR_LOG_ALERT log level.
Log::attach()
Adds a Log_observer instance to the list of observers that are listening for messages emitted by this Log instance.
Log::close()
Abstract implementation of the close() method.
Log::crit()
A convenience function for logging a critical event. It will log a message at the PEAR_LOG_CRIT log level.
Log::debug()
A convenience function for logging a debug event. It will log a message at the PEAR_LOG_DEBUG log level.
Log::detach()
Removes a Log_observer instance from the list of observers.
Log::emerg()
A convenience function for logging a emergency event. It will log a message at the PEAR_LOG_EMERG log level.
Log::err()
A convenience function for logging a error event. It will log a message at the PEAR_LOG_ERR log level.
Log::factory()
Attempts to return a concrete Log instance of type $handler.
Log::flush()
Abstract implementation of the flush() method.
Log::getIdent()
Returns the current identification string.
Log::getMask()
Returns the current level mask.
Log::getPriority()
Returns the current default priority.
Log::info()
A convenience function for logging a information event. It will log a message at the PEAR_LOG_INFO log level.
Log::isComposite()
Indicates whether this is a composite class.
Log::log()
Abstract implementation of the log() method.
Log::MASK()
Calculate the log mask for the given priority.
Log::MAX()
Calculate the log mask for all priorities less than or equal to the given priority. In other words, $priority will be the highests priority matched by the resulting mask.
Log::MIN()
Calculate the log mask for all priorities greater than or equal to the given priority. In other words, $priority will be the lowest priority matched by the resulting mask.
Log::notice()
A convenience function for logging a notice event. It will log a message at the PEAR_LOG_NOTICE log level.
Log::open()
Abstract implementation of the open() method.
Log::priorityToString()
Returns the string representation of a PEAR_LOG_* integer constant.
Log::setIdent()
Sets this Log instance's identification string.
Log::setMask()
Set and return the level mask for the current Log instance.
Log::setPriority()
Sets the default priority to the specified value.
Log::singleton()
Attempts to return a reference to a concrete Log instance of type $handler, only creating a new instance if no log instance with the same parameters currently exists.
Log::stringToPriority()
Returns the the PEAR_LOG_* integer constant for the given string representation of a priority name. This function performs a case-insensitive search.
Log::UPTO()
Calculate the log mask for all priorities up to the given priority.
Log::warning()
A convenience function for logging a warning event. It will log a message at the PEAR_LOG_WARNING log level.

Class Details

[line 23]
The Log_composite:: class implements a Composite pattern which allows multiple Log implementations to receive the same events.



Tags:

author:  Jon Parise <jon@php.net>
author:  Chuck Hagenbuch <chuck@horde.org>
since:  Horde 1.3
since:  Log 1.0
example:  example not found


[ Top ]


Class Methods


constructor Log_composite [line 45]

Log_composite Log_composite( boolean $name, [boolean $ident = ''], [boolean $conf = array()], [boolean $level = PEAR_LOG_DEBUG])

Constructs a new composite Log object.



Tags:

access:  public


Parameters:

boolean   $name   This parameter is ignored.
boolean   $ident   This parameter is ignored.
boolean   $conf   This parameter is ignored.
boolean   $level   This parameter is ignored.

[ Top ]

method addChild [line 199]

boolean addChild( &$child, object $child)

Adds a Log instance to the list of children.



Tags:

return:  True if the Log instance was successfully added.
access:  public


Parameters:

object   $child   The Log instance to add.
   &$child  

[ Top ]

method close [line 77]

True close( )

Closes all of the child instances.



Tags:

return:  if all of the child instances were successfully closed.
access:  public


Overrides Log::close() (Abstract implementation of the close() method.)

[ Top ]

method flush [line 101]

True flush( )

Flushes all child instances. It is assumed that all of the children have been successfully opened.



Tags:

return:  if all of the child instances were successfully flushed.
since:  Log 1.8.2
access:  public


Overrides Log::flush() (Abstract implementation of the flush() method.)

[ Top ]

method isComposite [line 166]

boolean isComposite( )

Returns true if this is a composite.



Tags:

return:  True if this is a composite class.
access:  public


Overrides Log::isComposite() (Indicates whether this is a composite class.)

[ Top ]

method log [line 130]

boolean log( mixed $message, [string $priority = null])

Sends $message and $priority to each child of this composite. If the children aren't already open, they will be opened here.



Tags:

return:  True if the entry is successfully logged.
access:  public


Overrides Log::log() (Abstract implementation of the log() method.)

Parameters:

mixed   $message   String or object containing the message to log.
string   $priority   (optional) The priority of the message. Valid values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG.

[ Top ]

method open [line 58]

True open( )

Opens all of the child instances.



Tags:

return:  if all of the child instances were successfully opened.
access:  public


Overrides Log::open() (Abstract implementation of the open() method.)

[ Top ]

method removeChild [line 220]

boolean removeChild( object $child)

Removes a Log instance from the list of children.



Tags:

return:  True if the Log instance was successfully removed.
access:  public


Parameters:

object   $child   The Log instance to remove.

[ Top ]

method setIdent [line 179]

void setIdent( string $ident)

Sets this identification string for all of this composite's children.



Tags:

since:  Log 1.6.7
access:  public


Overrides Log::setIdent() (Sets this Log instance's identification string.)

Parameters:

string   $ident   The new identification string.

[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:51:44 +0100 by phpDocumentor 1.4.3