enhance version of PEAR::Log display driver
| From: | Laurent Laville | Date: | Sat, 17 Jul 2004 15:37:14 +0000 |
| Subject: | enhance version of PEAR::Log display driver | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-32113@lists.php.net to get a copy of this message | ||
Few month ago when i've begun to implement PEAR_ErrorStack into HTML_Progress
i was a bit disapointed by PEAR::Log display driver (current version available on package 1.8.4).
So i've contacted Paul Yanchenko (author of LOG display driver) and wrote a first enhance
version.
Finally i'm also sad of features of my own proposal, even if it's allow me to write this
new version
i'll present you now !
You can see source code and live demos at
http://pear.laurent-laville.org/HTML_Progress/examples/errorstack/display_errors2.html
Example A.1 show how you can use the new version like the current one (Paul Yanchenko's
version)
There are 5 examples A1 A2 A3, B1 B2
Take CARE that these examples works only because i've patched a little PEAR_ErrorStack. (Greg
it's for you) !
Effectively, to keep current structure of PEAR::LOG architecture, we can't give a third
argument on
log method as it was done by
PEAR_ErrorStack::_log() method
Here are my patch
if ($this->_logger) {
//$this->_logger->log($err['message'], $level, $err);
$this->_logger->log($err, $level);
} else {
//$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']->log($err['message'], $level,
$err);
$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']->log($err, $level);
}
(and of course use it with my new display driver version )
http://pear.laurent-laville.org/HTML_Progress/examples/highlighter.php?file=./errorstack/display185.php
Feel free to tell me what you think about it
I'll be away until tomorrow in evening, so excuse me if i can't reply to your mails before
.
Laurent