pedrofornaza/monolog-mysql

Laravel 5 MySQL driver for Monolog

v0.1 2016-03-02 00:32 UTC

This package is not auto-updated.

Last update: 2024-11-29 21:17:30 UTC


README

MySQL driver for Laravel Monolog.

Installation

To get the lastest version of Theme simply require it in your composer.json file.

"pedrofornaza/monolog-mysql": "v0.1"

You'll then need to run composer install to download it and have the autoloader updated.

Open up config/app.php and find the providers key.

'providers' => array(
    // ...
    Fornaza\Laravel\Provider\MonologMysqlHandlerServiceProvider::class,
);

Publish config using artisan CLI.

php artisan vendor:publish

Migrate tables.

php artisan migrate

Usage

Log::getMonolog()->pushHandler(new Fornaza\Monolog\Handler\MysqlHandler());

Or in bootstrap/app.php:

$app->configureMonologUsing(function($monolog) use($app) {
    $monolog->pushHandler(new Fornaza\Monolog\Handler\MysqlHandler());
});

Credits

Based on: