Question about pear Log
| From: | Dmitri | Date: | Mon, 26 Nov 2007 17:12:36 +0000 |
| Subject: | Question about pear Log | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-28225@lists.php.net to get a copy of this message | ||
Hello!
I use pear log to log various events, arrays, and other things throught my scripts. It's mostly for debugging.
This is how I usually use it (just an example)
$this->objLogger->log(LF . __CLASS__ . LF . 'function: ' . __FUNCTION__ . LF . 'line: ' . __LINE__ . LF. '$strFFMPEGOptions: ' . $strFFMPEGOptions . LF);
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.
I mean, when I use Exception class, I don't have to add all these, just write
throw new Exception('something is wrong');
and then to get line I would use $e->getLine().
--
Open Source ALL content management
with streaming video
http://wiki.sharedlog.com