Re: Re: [Log class] Problem when Logging into a database
| From: | Frederic Poeydomenge | Date: | Thu, 28 Nov 2002 15:40:30 +0000 |
| Subject: | Re: Re: [Log class] Problem when Logging into a database | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-11225@lists.php.net to get a copy of this message | ||
Jon,
I've found some other inconsistencies in the Pear::Log package and would like to
submit them to you (see the diff attached) if you don't see any objection.
IMHO :
1) in Log/sql.php
function close() should not close the connection if an existing database
connection was provided, but in that case you should let the calling program
manage itself the connection ?
2) in Log.php :
function log($message, $priority = LOG_INFO)
should be :
function log($message, $priority = PEAR_LOG_INFO)
using the 'PEAR_' prefix as in others classes (mail, console...)
3) in Log/file.php, same problem :
function Log_File($name, $ident = '', $conf = array(), $maxLevel =
LOG_DEBUG)
should be :
function Log_File($name, $ident = '', $conf = array(), $maxLevel =
PEAR_LOG_DEBUG)
4) Why is there the following difference : in file.php, lines are stored in a
buffer (_logLines) and then printed out by the destructor, but in sql.php, lines
are inserted directly into the database without any buffering... Is there a
reason to have two such different ways to compute the data ?
Regards,
--
Frederic Poeydomenge