Monolog -- PHP 日志库

官方网站:https://seldaek.github.io/monolog/

GitHub:https://github.com/Seldaek/monolog

1
$ composer require monolog/monolog
1
2
3
4
5
6
7
8
// create a log channel
$log = new Logger('name');
$log->pushHandler(new StreamHandler('/path/to/your.log', Logger::WARNING));

// add records to the log
// 之后只能调用 warning 以上级别
$log->warning('Foo');
$log->error('Bar');
khs1994 wechat
微信扫码赞赏我的文章
0%