gilg4mesh/monolog-mysql
最新稳定版本:0.1.8
Composer 安装命令:
composer require gilg4mesh/monolog-mysql
包简介
Laravel 5.5+ MySQL driver for Monolog
README 文档
README
This package will log errors into MySQL database instead storage/log/laravel.log file.
Installation
composer require gilg4mesh/monolog-mysql
Open up config/app.php and find the providers key.
'providers' => array(
// ...
Logger\Laravel\Provider\MonologMysqlHandlerServiceProvider::class,
);
Publish config using Laravel Artisan CLI.
php artisan vendor:publish
Migrate tables.
php artisan migrate
Application Integration
In your application bootstrap/app.php add:
$app->configureMonologUsing(function($monolog) use($app) { $monolog->pushHandler(new Logger\Monolog\Handler\MysqlHandler()); });
Environment configuration
If you wish to change default table name to write the log into or database connection use following definitions in your .env file
DB_LOG_TABLE=logs
DB_LOG_CONNECTION=mysql
Credits
Based on:
- [Pedro Fornaza] (https://github.com/pedrofornaza/monolog-mysql)
统计信息
- 总下载量: 1.5k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-01-13