#317 [NEW]: Error in /manual/en/package.logging.log.examples.php
| From: | platter at earthlink dot net | Date: | Thu, 27 Nov 2003 19:36:37 +0000 |
| Subject: | #317 [NEW]: Error in /manual/en/package.logging.log.examples.php | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-2014@lists.php.net to get a copy of this message | ||
From: platter at earthlink dot net
Operating system: N/A
PHP version: 4.3.3
PHP Bug Type: Documentation
Bug description: Error in /manual/en/package.logging.log.examples.php
Description:
------------
Example 28-1 says that the messages will be written into the file
user.log, when they actually will be written into /tmp/out1.log
Reproduce code:
---------------
<?php
require_once 'Log.php';
$conf = array('mode' => 0600, 'timeFormat' => '%X %x');
$log = &Log::singleton('file', '/tmp/out1.log', 'test1', $conf,
LOG_INFO);
for ($i = 0; $i < 12; $i++) {
$log->log("Foo: $i", LOG_INFO);
}
$log->close();
?>
Expected result:
----------------
Output to user.log (per the docs)
Actual result:
--------------
output to /tmp/out1.log (per the code)
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=317&edit=1
--