кемерово-ман / log-вендор
此包的最新版本(6.0.1)没有可用的许可证信息。
6.0.1
2020-03-16 03:46 UTC
Requires
- ext-json: *
- laravel/framework: 6.0.*
- dev-master
- 6.0.1
- 5.8.x-dev
- 5.8.8
- 5.8.7
- 5.8.6
- 5.8.5
- 5.8.4
- 5.8.3
- 5.8.1
- 5.7.x-dev
- 5.7.8
- 5.7.7
- 5.7.6
- 5.7.5
- 5.7.4
- 5.7.3
- 5.7.2
- 5.7.1
- 0.2.8
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.1
- 0.1.0
- 0.0.11
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-dependabot/composer/guzzlehttp/guzzle-6.5.8
- dev-dependabot/composer/guzzlehttp/psr7-1.8.5
- dev-dependabot/composer/erusev/parsedown-1.7.4
- dev-dependabot/composer/league/flysystem-1.1.4
- dev-dependabot/composer/laravel/framework-6.20.26
- dev-dependabot/composer/symfony/http-foundation-4.4.1
This package is not auto-updated.
Last update: 2024-09-24 02:57:50 UTC
README
添加到项目中的功能:可以直接在文本文件和json中记录日志,并在浏览器中读取json日志。配置在config/log.php中。添加项目路由:/logs - 日志列表,/logs/{file} - 查看json日志
安装
- 执行
require kemerovo-man/log-vendor
对于 Laravel 5.7
"require": {
"kemerovo-man/log-vendor": "5.7.*"
}
对于 Laravel 5.8
"require": {
"kemerovo-man/log-vendor": "5.8.*"
}
- 添加到app.conf中
'providers' => [
KemerovoMan\LogVendor\LogVendorServiceProvider::class
]
-
php artisan vendor:publish
-
配置config/log.php
可以使用中间件关闭路由 /logs, /logs/{file}
例如
'middleware' => ['web', 'auth']
-
编写配置文件为所有日志并添加到门面(facade)的方法
-
可以修改Exceptions/Handler.php
public function report(Exception $exception)
{
if ($this->shouldntReport($exception)) {
return;
}
parent::report($exception);
\Log::laravelReport($exception);
}