xinningsu/yii2-raygun
最新稳定版本:v1.0.0
Composer 安装命令:
composer require xinningsu/yii2-raygun
包简介
Raygun Yii2 logger, Raygun integration for Yii2.
关键字:
README 文档
README
Raygun integration for Yii2, Raygun Error Logger.
Installation
composer require xinningsu/yii2-raygun
Usage
Once you have finished the Raygun installation, set up Raygun component and Raygun log target in Yii common config file, e.g., config/web.php:
[
// ...
'components' => [
// ...
'raygun' => [
'class' => \Sulao\YiiRaygun\RaygunComponent::class,
'config' => [
'api_key' => 'your_raygun_api_key', // Update with your Raygun API key
// For more configuration options, please refer to
// https://github.com/xinningsu/yii2-raygun/blob/master/config/raygun.php
],
],
'log' => [
// ...
'targets' => [
// ...
[
'class' => \Sulao\YiiRaygun\RaygunTarget::class,
'levels' => ['error', 'warning'],
'except' => [
\yii\web\HttpException::class,
],
],
],
],
// ...
],
// ...
],
Testing
In the controller file, add the code below
\Yii::error('test error');;
Or trigger an exception
throw new \Exception('test exception');
Then, check if the report is available in the Raygun Crash Reporting.
License
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-21