PHPackages                             snakano/cake-sentry - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. snakano/cake-sentry

ActiveCakephp-plugin[Logging &amp; Monitoring](/categories/logging)

snakano/cake-sentry
===================

Sentry error handler plugin for CakePHP2

0.2.0(1y ago)015.4kBSD-3-ClausePHPPHP &gt;=5.2.8

Since Jul 1Pushed 1y agoCompare

[ Source](https://github.com/SNakano/cake-sentry)[ Packagist](https://packagist.org/packages/snakano/cake-sentry)[ Docs](https://github.com/SNakano/cake-sentry)[ RSS](/packages/snakano-cake-sentry/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Cake-Sentry
===========

[](#cake-sentry)

**Cake-Sentry** is an error handler plugged on [Sentry](http://www.getsentry.com) - [docs](http://sentry.readthedocs.org/en/latest/quickstart/index.html#setting-up-an-environment)

Installation
------------

[](#installation)

**Note if you don't install from composer you will have to manually download the raven component and install it before proceeding to step 2.**

1. Install Sentry Plugin into your CakePHP project with composer :

```
    // composer.json

    // …

    "require": {
      // …
      "snakano/cake-sentry": "*"
    },

    // …
```

2. Load the cake-sentry Plugin in your *bootstrap.php* :

```
	CakePlugin::load('Sentry');
```

3. Configure the error handler in your *core.php* :

```
	App::uses('SentryErrorHandler', 'Sentry.Lib');

	Configure::write('Sentry', array(
		'production_only' => false, // true is default value -> no error in sentry when debug
		'PHP' => array(
			'server'=>'http://your-sentry-DSN-for-PHP'
		),
		'javascript' => array(
			'server'=>'http://your-sentry-DSN-for-javascript'
		)
	));

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

	Configure::write('Exception', array(
		'handler' => 'SentryErrorHandler::handleException',
		'renderer'=>'ExceptionRenderer'
	));
```

4. Use Sentry as logger :

```
	CakeLog::config('default', array('engine' => 'Sentry.SentryLog'));
```

5. include ravenjs and init script in the default layout :

```
