Re: using PEAR_ErrorStack for debug output
| From: | Paul M Jones | Date: | Sun, 13 Jun 2004 01:54:32 +0000 |
| Subject: | Re: using PEAR_ErrorStack for debug output | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30587@lists.php.net to get a copy of this message | ||
On Jun 12, 2004, at 6:29 PM, greg@chiaraquartet.net wrote:
PEAR_ErrorStack is designed specifically for this purpose $stack->push([debug level], 'debug', array([debug info]), 'debug message'); can be used. The user can set the log object externally, if the stack is a singleton, and you don't even need to write it into the Template class. ErrorStack is somewhat misleading. The primary reason it expects a string for the error level is to allow for some custom stuff such as passing in debug information. Obviously, you'll only want to do this if the debug level is high enough to justify displaying, for performance reasons, but that is another issue.Philippe, you said (accurately!) that "we all have our little solution for debug output". I think this is an opportunity to make out little solution the same thing as a common solution. Greg's ErrorStack, as a piece of foundation work, just seems to get better the more you work with it. -- Paul M. Jones Savant: the simple alternative to Smarty for PHP. http://phpsavant.com/ DB_Table: build RDBMS tables and XHTML forms in one PHP class. http://wiki.ciaweb.net/yawiki/index.php?area=DB_Table Yawiki: your collaborative online documentation system. http://yawiki.com/ Yawp: a single-file foundation for PHP applications. http://phpyawp.com/