ldubois/cake-bugsnag
Composer 安装命令:
composer require ldubois/cake-bugsnag
包简介
bugsnag plugin for CakePHP4
README 文档
README
CakePHP integration for Bugsnag.
Requirements
- PHP 7.1+
- CakePHP 4.0+
- and Bugsnag account
Installation
With composer install.
composer require ldubois/cake-bugsnag
Usage
Set config files.
Write your Bugsnag account info.
// in `config/app.php` return [ 'Bugsnag' => [ 'apiKey' => YOUR_Bugsnag_apiKey, 'userId' => YOUR_SESSION_USER_ID,//default => Auth.User.id in Session 'userName' => YOUR_SESSION_USER_NAME //default => Auth.User.name in Session ] ];
Loading plugin.
In Application.php
public function bootstrap() { parent::bootstrap(); $this->addPlugin(\ldubois\Bugsnag\Plugin::class); }
Or use cake command.
bin/cake plugin load ldubois/Bugsnag --bootstrap
That's all! 🎉
Advanced Usage
Ignore noisy exceptions
You can filter out exceptions that make a fuss and harder to determine the issues to address(like PageNotFoundException)
Set exceptions not to log in Error.skipLog.
ex)
// in `config/app.php` 'Error' => [ 'skipLog' => [ NotFoundException::class, MissingRouteException::class, MissingControllerException::class, ], ]
ref: CakePHP Cookbook
https://book.cakephp.org/4/en/development/errors.html#error-exception-configuration
统计信息
- 总下载量: 5.49k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-11-10