Package Data | |
---|---|
Maintainer Username: | peiit |
Maintainer Contact: | admin@peiit.com (peiit) |
Package Create Date: | 2016-10-10 |
Package Last Update: | 2016-10-10 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-18 03:04:44 |
Package Statistics | |
---|---|
Total Downloads: | 28 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 3 |
Total Forks: | 0 |
Total Open Issues: | 0 |
This is a customer logger base of monolog for Laravel/Lumen 5.0+,it can save the log to different files. 这是一个基于monolog适用于Laravel/Lumen 5.0及以上版本的个性化日志输出拓展,可以将日志安装需求输出到同的日志文件里。
composer require peiit/jplogger
ServiceProvider
in config/app.php
:Peiit\JPLogger\JPLoggerServiceProvider::class,
ServiceProvider
in bootstrap/app.php
:$app->register(Peiit\JPLogger\JPLoggerServiceProvider::class);
//Example
$log_name = 'jp_test';//log file name
$j_log = app('JPLogger')->logger($log_name);//Create a logger
$j_log->info('do something****' . microtime(true),['param1','param2']);//log a info
$j_log->error('some err****' . microtime(true));//log a error
It use as laravel's logger in the same way. 本拓展和Laravel/Lumen使用的日志器使用方法一样。
You can find the storage/logs/jp_test.log
is the customer log.
你可以看到自己的定制日志 storage/logs/jp_test.log
.
MIT