eslym / laravel-error-report
为Laravel提供更好的错误报告
2.1.0
2019-07-26 05:12 UTC
Requires
- php: >=7.1
- ext-json: *
- filp/whoops: ^2.2
- illuminate/config: >=5.6 <6.0
- illuminate/console: >=5.6 <6.0
- illuminate/database: >=5.6 <6.0
- illuminate/http: >=5.6 <6.0
- illuminate/routing: >=5.6 <6.0
- illuminate/support: >=5.6 <6.0
- ramsey/uuid: ^3.7
README
为什么需要这个包? 有时生产环境中会发生错误,但默认的错误报告并没有记录环境变量等信息。在有限的信息下追踪错误很困难,而服务器存储所有信息又过于庞大。这个包将检测重复的错误,并只为每个错误存储有限的样本。
安装
composer install eslym/laravel-error-report ^2.0
使用方法
- 迁移数据库
- 使用报告功能
- 安排清理
// app/Exceptions/Handler.php ... public function report(Exception $exception) { if($this->shouldReport($exception)){ \Eslym\ErrorReport\Facades\Reporter::report($exception); } } ...
// app/Console/Kernel.php $schedule->command('errors:cleanup') ->daily();