pedrofornaza / monolog-mysql by pedrofornaza

Laravel 5 MySQL driver for Monolog
2,013
2
2
Package Data
Maintainer Username: pedrofornaza
Maintainer Contact: pedro.fornaza@gmail.com (Pedro Fornaza)
Package Create Date: 2016-03-02
Package Last Update: 2016-03-02
Language: PHP
License: MIT
Last Refreshed: 2024-11-26 15:04:59
Package Statistics
Total Downloads: 2,013
Monthly Downloads: 3
Daily Downloads: 1
Total Stars: 2
Total Watchers: 2
Total Forks: 2
Total Open Issues: 0

Laravel Monolog MySQL Handler.

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: