定制 chrisshick/cakephp-airbrake 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

chrisshick/cakephp-airbrake

最新稳定版本:1.0.3

Composer 安装命令:

composer require chrisshick/cakephp-airbrake

包简介

A CakePHP 3.x plugin to use Airbrake for errors and exceptions

README 文档

README

A plugin to seamlessly integrate Airbrake with CakePHP 3 for errors and exceptions.

Installation via Composer

composer require chrisshick/cakephp-airbrake

Setup

You don't have to enable the Plugin because it uses an error handler. Therefore, all you have to do is replace this line in the app/Config/bootstrap.php :

(new ErrorHandler(Configure::read('Error')))->register();

with this line:

(new \chrisShick\AirbrakeCake\Error\AirbrakeHandler(Configure::consume('Error')))->register();

Then, set up the configuration in the app/Config/app.php file:

 'AirbrakeCake'=> [
        'apiKey'=>'<YOUR AIRBRAKE API KEY>',
        'options'=>[],
        'debugOption'=>false
  ]

#Configuration explained

The configuration takes the following keys:

  'apiKey', 'options', 'debugOption'

The apiKey is the api key that Airbrake generates for you.

The options array is the additional Airbrake parameters you want to add. You can view the additional parameters here: PHPAirbrake

The debugOption key expects a true or false value that lets you set whether or not you want to log exceptions and errors when debug is on or off. If you want to log the errors to Airbrake when debug is on then set the debugOption key to true.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-23