Best practices to review firePHP output more easily
I've implemented firePHP with ZF (http://www.christophdorn.com/Blog/2008/09/02/firephp-and-zend-framework-16/) which works like a charm. However what I'm noticing now that my application is growing and that the amount of firePHP output grows is that it's beocming increasingly difficult to review it. The main issue for me is that there are only 3 colors available (blue for INFO, yellow for WARN, and red for CRIT) thus making difficult to distinguish entries (especially when there aren't any errors an开发者_如何学God that the whole output is "blue" basically).
What do you guys do to make your firePHP output easier to read?
Thanks.
timestamps, lots of timestamps ;) I realy like to know where and WHEN are all those bugs :) It wont hurt to display only important things either.
Also look at FirePHP Companion
The FirePHP implementation shipped with ZendFramework is somewhat limited. I would recommend using FirePHPCore 0.3 or FirePHP 1.0 instead. The ZF components that log data can be updated to use the external library instead. There are plans for an updated ZF integration for FirePHP 1.0.
Using the external FirePHP libraries, there are several options to organizing logged messages for easier review.
FirePHPCore 0.3:
- Use labels -
$firephp->log('Message','Optional Label');
- Use groups -
$firephp->group('Test Group');
- Use colored groups -
$firephp->group('Collapsed and Colored Group', array('Collapsed' => true, 'Color' => '#FF00FF'));
See API reference for more information.
FirePHP 1.0 + DeveloperCompanion:
- Use labels -
$console->label('Label')->log($var);
- Use groups -
$console->group('name', 'Label')->log($var);
(colored groups will be available again soon) - Use separate consoles -
FirePHP::to('request')->console('Console 1')->log($var);
See API reference for more information.
精彩评论