intersvyaz/yii-sentry

Sentry component and LogRoute for Yii1

1.0.5 2018-08-27 06:18 UTC

This package is auto-updated.

Last update: 2020-07-07 21:01:04 UTC


README

Sentry component and log route for Yii framework.

Requirements

Download

composer require intersvyaz/yii-sentry

Configure

main.php:

...
'preload' => [
    ...
    'sentry',
],
...
'components' => [
    'sentry' => [
		'class' => Intersvyaz\YiiSentry\SentryComponent::class,
		'dsn' => 'https://X1:X2@host.com/2',
		'useRavenJs' => true,
		'ravenJsPlugins' => ['jquery'],
		'enabled' => !YII_DEBUG,
	],
    ...
    'log' => [
        'class' => 'CLogRouter',
        'routes' => [
             ...
            [
				'class' => Intersvyaz\YiiSentry\SentryLogRoute::class,
				'levels' => 'error, warning',
				'except' => 'exception.CHttpException.404, exception.CHttpException.400, exception.CHttpException.403',
			],
		],
    ],
],
...