errorstream/errorstream-yii2
Composer 安装命令:
composer require errorstream/errorstream-yii2
包简介
Yii 2 Package for ErrorStream.com integration
README 文档
README
Yii2 integration for Errorstream
#Installation Instructions
First, run the following command on the terminal to download and install the package
composer require errorstream/errorstream-yii2
Next, register the client class in your web.php configuration file. You can find your API token and Project token on the project settings page inside of errorstream.com
'components' => [ ... 'errorstream' => [ 'class' => 'ErrorStream\ErrorStreamClient\ErrorStreamClient', 'api_token' => 'YOUR_API_TOKEN', //Put your api token here 'project_token' => 'YOUR_PROJECT_TOKEN', //Put your project token here 'active' => true, //You might want to only activate this in production mode ] ... ]
Next, you want to edit the errorHandler setting in web.php configuration file. You'll want to place the ErrorStreamErrorHandler as a 'class' for your error handler, like this.
'components' => [ ... 'errorHandler' => [ 'errorAction' => 'site/error', 'class' => 'ErrorStream\ErrorStream\ErrorStreamErrorHandler', ], ... ]
Finally, you want to edit the errorHandler setting in web.php configuration file. You'll want to place the ErrorStreamErrorHandler as a 'class' for your error handler, like this.
'components' => [ ... 'log' => [ .. 'targets' => [ ... [ 'class' => 'ErrorStream\ErrorStream\ErrorStreamLogger', 'levels' => ['error', 'warning'], //Only send errors and warnings. 'logVars' => [], //Necessary so you don't submit every request to our server. ], ... ], ] ]
统计信息
- 总下载量: 730
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2016-06-16