stuzzo/monolog-extender
Composer 安装命令:
composer require stuzzo/monolog-extender
包简介
Monolog wrapper that extends formatters and processors to add further informations
README 文档
README
Monolog sends your logs to files, sockets, inboxes, databases and various web services. See the complete reference
This library extends Monolog's handlers and processors adding data to the record generated from processors. Furthermore the library improves logs format.
Installation
Install the latest version with
$ composer require stuzzo/monolog-extender
Basic Usage
<?php use Monolog\Logger; use Monolog\Handler\StreamHandler; // create a log channel $log = new Logger('request'); $handler = new StreamHandler('path/to/your.log', Logger::WARNING); $formatter = new \Stuzzo\Monolog\Formatter\StreamFormatter(null, 'Y-m-d H:i:s'); $handler->setFormatter($formatter); $log->pushHandler($handler); try { throw new \RuntimeException('Something happen'); } catch (\Exception $exception) { $log->critical('Error', ['exception' => $exception]); }
Documentation
About
Requirements
- This library works with PHP 5.5.9 or above.
Author
Alfredo Aiello - stuzzo@gmail.com - http://twitter.com/stuzzo
统计信息
- 总下载量: 5.7k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-31