Re: Re: Possible problem in PEAR Log
| From: | Michael Dransfield | Date: | Thu, 04 Jul 2002 11:51:43 +0000 |
| Subject: | Re: Re: Possible problem in PEAR Log | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7466@lists.php.net to get a copy of this message | ||
for some reason the attachment didnt....
-------------------------------------------------------------------------------------
48,49c48,65
<
<
---
/** * * Initialises the log defines the PEAR_ constants * * @access public */function Log(){ define('PEAR_LOG_EMERG', 1); define('PEAR_LOG_ALERT', 2); define('PEAR_LOG_CRIT', 3); define('PEAR_LOG_ERR', 4); define('PEAR_LOG_WARNING', 5); define('PEAR_LOG_NOTICE', 6); define('PEAR_LOG_INFO', 7); define('PEAR_LOG_DEBUG', 8); }146a163,171
PEAR_LOG_EMERG => 'emergency',
PEAR_LOG_ALERT => 'alert',
PEAR_LOG_CRIT => 'critical',
PEAR_LOG_ERR => 'error',
PEAR_LOG_WARNING => 'warning',
PEAR_LOG_NOTICE => 'notice',
PEAR_LOG_INFO => 'info',
PEAR_LOG_DEBUG => 'debug',
156d180
<
-------------------------------------------------------------------------------------
At 12:48 04/07/2002 +0100, Michael Dransfield wrote:
At 22:45 03/07/2002 -0400, Jon Parise wrote:On Wed, Jul 03, 2002 at 05:34:14PM +0100, Michael Dransfield wrote:It was only marked as a possible problem, couldnt it be solved by using a seperate set of constants (PEAR_LOG_*) which could then be mapped to the LOG_ constants if needed for syslog features where the integer is needed.I think that this proposal is resonable, although it will break backwards compatibility and will require us to react according to the current operating platform at runtime.I do not think it needs to break bc at all, I am attaching a diff, for Log/Log.php which seems to work here for either the PEAR_ or LOG_ constants. It will need an extra function which can convert a PEAR_ constant to a LOG_ constant in syslog. A simple function like priorityToString should do array (PEAR_LOG_ERROR => LOG_ERROR, etc...etc....) -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php