kucera / monolog-extensions
A set of Monolog extensions.
Installs: 7 473
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 7
Open Issues: 1
Requires
- php: ~7.0
- monolog/monolog: ~1.0
- tracy/tracy: ~2.4.0
Requires (Dev)
- jakub-onderka/php-console-highlighter: 0.3.2
- jakub-onderka/php-parallel-lint: 0.9.2
- phing/phing: 2.15.2
- phpunit/phpunit: 5.6.2
- shipito/coding-standard: 0.6.0
This package is not auto-updated.
Last update: 2024-11-09 17:19:32 UTC
README
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.
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.