Source for file Log.php
Documentation is available at Log.php
* @uses OpenID_Observer_Common
* @author Bill Shupp <hostmaster@shupp.org>
* @copyright 2009 Bill Shupp
* @license http://www.opensource.org/licenses/bsd-license.php FreeBSD
* @link http://pearopenid.googlecode.com
require_once 'OpenID/Observer/Common.php';
* An observer based on PEAR's Log package. You may either pass in your own Log
* instance to the constructor, or allow the default file driver to write to
* /tmp/OpenID_Observer_Log.log by default.
* @uses OpenID_Observer_Common
* @author Bill Shupp <hostmaster@shupp.org>
* @copyright 2009 Bill Shupp
* @license http://www.opensource.org/licenses/bsd-license.php FreeBSD
* @link http://pearopenid.googlecode.com
* Holds the instance of Log
* Allows you to pass in a Log instance and an array of events to log. If
* no instance of Log is given, the 'file' Log driver will be used, and write to
* /tmp/OpenID_Observer_Log.log.
* @param Log $log Instance of Log, optional
* @param array $events Custom list of events to log
public function __construct(Log $log =
null, array $events =
array())
if (!$log instanceof
Log) {
$log =
Log::factory('file', '/tmp/' . __CLASS__ .
'.log');
* @param array $event Array containing 'name' and 'data' keys
public function update(array $event)
if (!in_array($event['name'], $this->events)) {
$this->log->log($event['name'] .
":\n");
$this->log->log($event['data']);
Documentation generated on Tue, 15 Dec 2009 19:00:54 -0800 by phpDocumentor 1.4.3