Re: Log->setIdent not behaving as I thought it would...
| From: | Jon Parise | Date: | Thu, 05 Jun 2003 05:50:49 +0000 |
| Subject: | Re: Log->setIdent not behaving as I thought it would... | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-17031@lists.php.net to get a copy of this message | ||
On Thu, Jun 05, 2003 at 12:29:40PM +1000, Alex Hayes wrote:
> There is a behavior in the package Log which is a bit strange to me....
>
> Say for example we do the following.
>
> $log = &Log::singleton('file', '/path/to/file', 'LOGID');
> $log->log('This is a message');
> $log->setIdent('ANOTHERLOGID');
> $log->log('This is another log message');
>
> ...
>
> This would output the following...
>
> Jun 05 11:16:37 LOGID [info] This is a message
> Jun 05 11:16:37 LOGID [info] This is another log message
>
> However I would of thought that it would output.
>
> Jun 05 11:16:37 LOGID [info] This is a message
> Jun 05 11:16:37 ANOTHERLOGID [info] This is another log message
This is actually only a problem with the file handler. The other
handlers work as expected.
> Please correct me if im wrong!!.... But if i am.. then why is there even the
> Log->setIdent() function....?
Thanks for pointing out the problem! I'll release a new version
(1.6.6) of the Log package with the fix in a few minutes.
--
Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)