2017 © Pedro Peláez
 

symfony-bundle monolog-tracy-bundle

Tracy BlueScreen handler for Monolog - Symfony bundle

image

nella/monolog-tracy-bundle

Tracy BlueScreen handler for Monolog - Symfony bundle

  • Saturday, February 24, 2018
  • by vrtak-cz
  • Repository
  • 3 Watchers
  • 7 Stars
  • 8,405 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 10 Versions
  • 22 % Grown

The README.md

Tracy BlueScreen handler for Symfony (Monolog)

This package is not maintained anymore, you can use mangoweb/monolog-tracy-handler instead., (*1)


Build Status Windows Build Status Code Coverage SensioLabsInsight Status Latest Stable Version Composer Downloads Dependency Status License MIT, GPL-2, GPL-3, (*2)

Sponzored by Shipito LLC., (*3)

Bundle providing mainly integration of Tracy into Symfony., (*4)

Are you looking for Monolog integration only? There is Monolog-Tracy., (*5)

Tracy - Blue Screen Handler

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., (*6)

To replace default Symfony Bluescreen you can use Tracy Bluescreen Bundle fully compatible with this library., (*7)

Installation

Using Composer:, (*8)

$ composer require nella/monolog-tracy-bundle

Register Bundle

// AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Nella\MonologTracyBundle\MonologTracyBundle(),
    );
}

Register a new Monolog handler

monolog:
    handlers:
        blueScreen:
            type: tracyBlueScreen

Configuration

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

# config.yml
monolog_tracy:
    log_directory: %kernel.logs_dir%/tracy # default
    handler_level: DEBUG # or 100 default - you can use int or constant name
    handler_bubble: true # default
    info_items:
        - Symfony 3.0.1 # default if HttpKernel is present
        - Doctrine ORM 2.5.2 # default if Doctrine ORM is present
        - Twig 1.23.1 # default if Twig is present
    panels: # no default panels
        - test.nella.monolog_tracy_bundle.panel.test_panel # callable ([class, method], [@service, method], @service, class::service)
    collapse_paths: # no default collapse paths
        - %kernel.root_dir%/vendor # TIP

This works out of the box and also in production mode!, (*10)

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), (*11)

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:, (*12)

// AppKernel.php

use Tracy\Debugger;

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

The Versions

30/12 2015

v0.2.0

0.2.0.0 https://github.com/pavelkucera/monolog-extensions-bundle

Bundle adding a set of Monolog extensions.

  Sources   Download

MIT GPL-3.0 GPL-2.0

The Requires

 

The Development Requires

log logging monolog symfony tracy blue screen

17/08 2014

v0.1.0

0.1.0.0 https://github.com/pavelkucera/monolog-extensions-bundle

Bundle adding a set of Monolog extensions.

  Sources   Download

MIT GPL-3.0 GPL-2.0

The Requires

 

The Development Requires

log logging monolog symfony tracy blue screen