承接 xinningsu/yii2-honeybadger 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

xinningsu/yii2-honeybadger

最新稳定版本:v1.0.0

Composer 安装命令:

composer require xinningsu/yii2-honeybadger

包简介

Honeybadger logger for Yii2, Honeybadger integration for Yii2.

README 文档

README

Honeybadger integration for Yii2, Honeybadger Error Logger.

MIT licensed Build Status Code Coverage Scrutinizer Code Quality Code Intelligence Status

Installation

composer require xinningsu/yii2-honeybadger

Usage

Once you have finished the Honeybadger installation, set up Honeybadger component and Honeybadger log target in Yii common config file, e.g., config/web.php:

[
    // ...
    'components' => [
        // ...
        // Honeybadger component
        'honeybadger' => [
            'class'  => \Sulao\YiiHoneybadger\Component::class,
            'config' => [
                'api_key'     => 'your_honeybadger_api_key', // Update with your Honeybadger API key
                'report_data' => true,
                // ...
                // For more configuration options, please refer to 
                // https://github.com/xinningsu/yii2-honeybadger/blob/master/config/honeybadger.php
                // https://docs.honeybadger.io/lib/php/reference/configuration/#default-configuration
            ],
        ],
        'log' => [
            // ...
            // Honeybadger log target
            'targets' => [
                // ...
                [
                    'class'  => \Sulao\YiiHoneybadger\Target::class,
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        // ...
    ],
    // ...
],

Testing

In the controller file, add the code below

\Yii::error('test error');

Or trigger an exception In the controller

throw new \Exception('test exception');

To manually send reports, you can refer to the code below:

\Yii::$app->honeybadger->notify(new \Exception('test exception'));
\Yii::$app->honeybadger->customNotification([
    'title'   => 'Special Error',
    'message' => 'Special Error: a special error has occurred',
]);

Then, check if the report is available in the Honeybadger.

License

MIT

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固