CakePHP 2.0 Airbrake Plugin

Craig Morris has just completed a new notifier for CakePHP 2.0.  CakePHP is a rapid development framework for PHP. Configuration is as simple as dropping in the files and including them in the Bootstrap.

app/Config/bootstrap.php

//Include our awesome error catcher.. 
CakePlugin::load('AirbrakeCake');
Configure::write('AirbrakeCake.apiKey', '');
App::uses('AirbrakeError', 'AirbrakeCake.Lib');

Then tell Cake to use those classes as the error and exception handler in

app/Config/core.php.

 
Configure::write('Error', array(
        'handler' => 'AirbrakeError::handleError',
        'level' => E_ALL & ~E_DEPRECATED,
        'trace' => true
    ));

    Configure::write('Exception', array(
        'handler' => 'AirbrakeError::handleException',
        'renderer' => 'ExceptionRenderer',
        'log' => true
    ));

Download the notifier from GitHub.
https://github.com/morrislaptop/AirbrakeCake

Monitor Your App Free for 30 Days

Discover the power of Airbrake by starting a free 30-day trial of Airbrake. Quick sign-up, no credit card required. Get started.