cube-agency / error-reporter
通过HTTP将异常报告到远程地址
v1.0.3
2018-06-20 14:45 UTC
README
- 需要包
composer require cube-agency/error-reporter
- 使用相关API URL和密钥更新.env文件
ERROR_REPORTER_API_URL=xxx
ERROR_REPORTER_API_KEY=yyy
- 在
config/app.php
中注册服务提供者(适用于Laravel 5.4及以下版本)
'providers' => [
CubeAgency\ErrorReporter\ErrorReporterServiceProvider::class
- 在
bootstrap/app.php
中绑定异常处理器
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
CubeAgency\ErrorReporter\Exceptions\Handler::class
);
- 通过在
config/error-reporter.php
中创建配置文件来覆盖包默认值(配置)