Laravel Monolog MySQL Handler.
MySQL driver for Laravel Monolog., (*1)
Installation
To get the lastest version of Theme simply require it in your composer.json file., (*2)
"pedrofornaza/monolog-mysql": "v0.1"
You'll then need to run composer install to download it and have the autoloader updated., (*3)
Open up config/app.php and find the providers key., (*4)
'providers' => array(
// ...
Fornaza\Laravel\Provider\MonologMysqlHandlerServiceProvider::class,
);
Publish config using artisan CLI., (*5)
php artisan vendor:publish
Migrate tables., (*6)
php artisan migrate
Usage
Log::getMonolog()->pushHandler(new Fornaza\Monolog\Handler\MysqlHandler());
Or in bootstrap/app.php:, (*7)
$app->configureMonologUsing(function($monolog) use($app) {
$monolog->pushHandler(new Fornaza\Monolog\Handler\MysqlHandler());
});
Credits
Based on:, (*8)