Re: Question about pear Log
| From: | Christian Weiske | Date: | Sun, 02 Dec 2007 13:19:37 +0000 |
| Subject: | Re: Question about pear Log | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-28250@lists.php.net to get a copy of this message | ||
Dimitri,
> I wonder if there is a way to NOT add all these __CLASS__,
> __FUNCTION__, __LINE__ and only add actual string that I want to log,
> like this: $this->objLogger->log( '$strFFMPEGOptions: ' .
> $strFFMPEGOptions . LF); and then have the log() automatically add
> things like class, function and line to the log for this event.
You could write your own method in an extendet logger class that uses
debug_get_backtrace() to get the location of the original call and log
this additionally to the message.
--
Regards/Mit freundlichen Grüßen
Christian Weiske
Attachment: [application/pgp-signature] signature.asc
Attachment: [application/pgp-signature] signature.asc