Re: Re: Possible problem in PEAR Log
| From: | Michael Dransfield | Date: | Wed, 03 Jul 2002 10:34:53 +0000 |
| Subject: | Re: Re: Possible problem in PEAR Log | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7447@lists.php.net to get a copy of this message | ||
It breaks because when you put
$l = new Log_file('logs/user_login.log', 'USER LOGIN');
$l->log("$user_name FROM ".$_SERVER['REMOTE_ADDR'], LOG_INFO);
$l->close();
enters this in the logs
Jul 02 13:47:44 USER LOGIN [debug] ............
^^^^^^^^ NOT INFOAt 02:34 03/07/2002 -0400, Jon Parise wrote:
On Tue, Jul 02, 2002 at 11:29:34AM +0200, Tomas V.V.Cox wrote: The function priorityToString() is probably break under Windows, because some constant values are the same for ex: LOG_EMERG == LOG_ALERT == LOG_CRIT == 1. I can see how the result would be suboptimal, but I don't see how it could be considered broken. If that's how the constants exist, there's little we can do to differentiate between them. As far as I know, it's legal for a switch statement to contain identical values for cases (although I haven't tested this; please let me know if I'm wrong); the interpreter should just select the first match. -- Jon Parise (jon@csh.rit.edu) . Information Technology (2001) http://www.csh.rit.edu/~jon/ : Computer Science House Member -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php