gluephp/glue-monolog
Composer 安装命令:
composer require gluephp/glue-monolog
包简介
Use monolog logger in Glue
README 文档
README
Use Monolog with gluephp/glue
Installation
Use Composer:
$ composer require gluephp/glue-monolog
Configure Monolog
$app = new Glue\App; $app->config->override([ 'monolog' => [ 'folder' => '/absolute/path/to/log/folder', 'file' => 'log_' . date('Ymd') . '.log', 'level' => 'error' // PSR-3 logging level ], ]);
Register Monolog
$app->register( new Glue\Monolog\ServiceProvider() );
Get the Monolog instance
Once the service provider is registered, you can fetch the Monolog instance with:
$monolog = $app->make('Monolog\Logger');
or since Monolog implements the PSR interface:
$monolog = $app->make('Psr\Log\LoggerInterface');
or use the alias:
$monolog = $app->log;
统计信息
- 总下载量: 157
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 5
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-05-06