#317 [Com]: Error in /manual/en/package.logging.log.examples.php

From: Date: Thu, 05 Feb 2004 20:00:50 +0000
Subject: #317 [Com]: Error in /manual/en/package.logging.log.examples.php
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-2428@lists.php.net to get a copy of this message
ID: 317 Comment by: negora at dotgeek dot org Reported By: platter at earthlink dot net Status: Open Bug Type: Documentation Operating System: N/A PHP Version: 4.3.3 New Comment: Dear platter, I think you misread the example text. What it says is "in the following example code". That is, for THAT specific code, the output file was user.log. In order for what you say to be a bug, the SAME EXACT CODE would have to be used, and in case it would log to another file than /tmp/user.log, THAT would be a bug. In your example, you changed the configuration of the log object, so the result is the one expected. Hope this clears it up for you. Previous Comments: ------------------------------------------------------------------------ [2003-11-27 14:36:37] platter at earthlink dot net 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 this bug report at http://pear.php.net/bugs/bug.php?id=317&edit=1

« previous php.pear.doc (#2428) next »