Skip to content

pavelkucera/monolog-extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kucera/monolog-extensions

Build Status Downloads this Month Latest stable

A set of Monolog extensions.

Installation

Using Composer:

$ composer require kucera/monolog-extensions:~0.2.0

Blue Screen Handler

Converts your exception reports into beautiful and clear html files using Tracy.

Uncaught exception rendered by Tracy

Tell me how!

Just push the handler into the stack.

use Kucera\Monolog\BlueScreenFactory;
use Kucera\Monolog\BlueScreenHandler;
use Monolog\Logger;

$logger = new Monolog\Logger('channel');

$logDirectory = __DIR__ . '/log';
$logger->pushHandler(new BlueScreenHandler(
    Factory::blueScreen(),
    $logDirectory,
    Logger::DEBUG,
    $bubble = TRUE
));

… Profit!

$logger->critical('Exception occured!', array(
    'exception' => new Exception(),
));

Tips

You don't have to use the factory method, handler is instantiable on its own. Kucera\Monolog\BlueScreenFactory::create() might come in handy then.

About

A set of Monolog extensions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages