2017 © Pedro Peláez
 

library monolog-extensions-bundle

Bundle adding a set of Monolog extensions.

image

kucera/monolog-extensions-bundle

Bundle adding a set of Monolog extensions.

  • Wednesday, December 30, 2015
  • by pavelkucera
  • Repository
  • 2 Watchers
  • 2 Stars
  • 7,374 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

kucera/monolog-extensions-bundle

Build Status Downloads this Month Latest stable, (*1)

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

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

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

Installation

Using Composer:, (*5)

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

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

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

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

// AppKernel.php

use Tracy\Debugger;

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

The Versions

30/12 2015

dev-master

9999999-dev 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

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