/RaygunCake

A CakePHP 2.x plugin for sending errors and exceptions to the Raygun.io service

Primary LanguagePHPMIT LicenseMIT

CakePHP 2.x Raygun.io Plugin

A CakePHP plugin to use Raygun.io for errors and exceptions. Required PHP 5.3+ (due to Raygun4php dependency)

Based on https://github.com/morrislaptop/AirbrakeCake

Dependencies

Installation

git submodule add git://github.com/t1mmen/RaygunCake.git app/Plugin/RaygunCake
cd app/Plugin/RaygunCake
git submodule init
git submodule update

app/Config/bootstrap.php

<?php
// Include our awesome error catcher..
CakePlugin::load('RaygunCake');
Configure::write('RaygunCake.apiKey', '<API KEY>');
App::uses('RaygunError', 'RaygunCake.Lib');

app/Config/core.php

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

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