Pear::Log warning
| From: | Paul Wolstenholme | Date: | Sun, 22 Jun 2003 23:30:35 +0000 |
| Subject: | Pear::Log warning | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-6178@lists.php.net to get a copy of this message | ||
While executing the code below, I get the following error:
PHP Notice: Undefined property: _id in /Library/PHP4/lib/php/Log.php on line 204
Notice: Undefined property: _id in /Library/PHP4/lib/php/Log.php on line 204
Am I using the code incorrectly or is this a bug?
/Paul
<?php
require_once "Log.php";
require_once "Log/observer.php";
require_once "observer_fatconnect.php";
$conf = array('mode' => 0600 ,'timeFormat' => '%x %X');
$log = & Log::singleton ('file', '/tmp/Connect.log', 'Connect', $conf, LOG_INFO);
//set the lowest level we want to be emailed about
$observer = new Log_observer_fatconnect (LOG_EMERG);
$attached = $log->attach($observer);
for ( $i =0;$i <12 ;$i ++)
{
//these messages will be logged but not emailed
$log->log("MyFunction: $i", LOG_INFO);
}
//this message will be logged and emailed
$log->log("MyFunction: OH NO! This can't be good", LOG_EMERG);
$log->close();
?>