承接 kucera/monolog-extensions-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kucera/monolog-extensions-bundle

Composer 安装命令:

composer require kucera/monolog-extensions-bundle

包简介

Bundle adding a set of Monolog extensions.

README 文档

README

Build Status Downloads this Month Latest stable

Bundle providing mainly integration of Tracy into Symfony.

Tracy capabilities

Long story short, Tracy helps you debug your applications when an error occurs providing you lots of information about what just happened. Check out live example and Tracy documentation to see the full power of this tool.

To replace default Symfony Bluescreen you can use Tracy Bluescreen Bundle fully compatible with this library.

Installation

Using Composer:

$ composer require kucera/monolog-extensions-bundle:~0.1.0

Register Bundle

// AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Kucera\MonologExtensionsBundle\KuceraMonologExtensionsBundle(), // what a terrible name!
    );
}

Register a new Monolog handler

monolog:
    handlers:
        blueScreen:
            type: blue screen

Profit!

Any error/exception making it to the top is automatically saved in %kernel.logs_dir%/blueScreen. You can easily change the log directory, see full configuration options below:

# config.yml
monolog:
    handlers:
        blueScreen:
            type: blue screen
            path: %kernel.logs_dir%/blueScreen # must exist
            level: debug
            bubble: true

This works out of the box and also in production mode!

Tips

Log notices/warnings in production

Use Symfony parameter debug.error_handler.throw_at: (see http://php.net/manual/en/function.error-reporting.php for possible values)

parameters:
    debug.error_handler.throw_at: -1

Using Tracy\Debugger::dump

To prevent forgotten dumps to appear on production you can simply change the mode like this:

// AppKernel.php

use Tracy\Debugger;

public function __construct($environment, $debug)
{
    Debugger::$productionMode = $environment === 'prod';
    parent::__construct($environment, $debug);
}

统计信息

  • 总下载量: 7.38k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固