Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.14.4

Request #12781 New log handler / modify existing log handler
Submitted: 2007-12-27 14:54 UTC
From: kpijnenb Assigned: jon
Status: Closed Package: Log (version 1.9.13)
PHP Version: 5.1.2 OS: Suse Linux
Roadmaps: 1.9.14    
Subscription  


 [2007-12-27 14:54 UTC] kpijnenb (Kees Pijnenburg)
Description: ------------ The request is to add another log handler similar to 'display' but with the log info enclosed in html tags. The benefit of this approach is that the log information will not disrupt the display of the page. My first approach can be found in my blog (http://blog.pijnenburg.it/?q=node/38). Note: my blog has been down for a day or so due some problem with caching. This post (and the rest of the blog) should be up and running again. A second approach could be to add the line/timeFormat option to the 'display' log handler. A lineFormat like '<b>%3$s</b>:%4$s' should produce more or less the current log format. A lineFormat like '<!-- %1$s %2$s [%3$s] %4$s -->' would produce the output of log handler in the above blog post. In both cases, you would apply the htmlspecialchars function on the message before output. Test script: --------------- http://blog.pijnenburg.it/?q=node/38 Expected result: ---------------- In the browser: nothing, with 'view source', the actual logging in html comments.

Comments

 [2007-12-30 00:49 UTC] jon (Jon Parise)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I elected to modify the existing display handler rather than introduce a new class. Please take a look at the code in CVS. Feedback is welcome.