更轻松地查看 firePHP 输出的最佳实践

发布于 2024-10-02 23:05:35 字数 300 浏览 10 评论 0原文

我已经用 ZF (http://www.christophdorn.com/Blog/2008/09/02/firephp-and-zend-framework-16/) 实现了 firePHP,它的工作方式就像一个魅力。然而,我现在注意到,我的应用程序正在增长,并且 firePHP 输出量也在增长,因此审查它变得越来越困难。对我来说,主要问题是只有 3 种颜色可用(蓝色表示信息,黄色表示警告,红色表示 CRIT),因此很难区分条目(特别是当没有任何错误并且整个输出为“蓝色”时) “ 基本上)。

你们如何让 firePHP 输出更易于阅读?

谢谢。

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 and that the whole output is "blue" basically).

What do you guys do to make your firePHP output easier to read?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一张白纸 2024-10-09 23:05:36

时间戳,很多时间戳;)
我真的很想知道这些错误在哪里以及何时出现:)
只显示重要的东西也没什么坏处。

另请参阅 FirePHP 伴侣

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

做个ˇ局外人 2024-10-09 23:05:36

ZendFramework 附带的 FirePHP 实现有些限制。我建议使用
FirePHPCore 0.3FirePHP 1.0 代替。记录数据的 ZF 组件可以更新为使用外部库。我们计划对 FirePHP 1.0 进行更新的 ZF 集成。

使用外部 FirePHP 库,有多种选项可以组织记录的消息以便于查看。

FirePHPCore 0.3

  • 使用标签 - $firephp->log('Message' ,'可选标签');
  • 使用组 - $firephp->group('测试组');
  • 使用彩色组 - $firephp->group('Collapsed)和彩色组', array('Collapsed' => true, 'Color' => '#FF00FF'));

请参阅 API 参考了解更多信息。

FirePHP 1.0 + DeveloperCompanion

  • 使用标签 - $console->label('Label')->log($var);
  • 使用组 - $console- >group('name', 'Label')->log($var); (彩色组很快就会再次可用)
  • 使用单独的控制台 - FirePHP::to('request') ->console('Console 1')->log($var);

请参阅 API 参考了解更多信息。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文