Yii2 log target which sends log messages to your Sentry instance.
Using Composer:
composer require rekurzia/yii2-sentry-log-target
Add Sentry target to your configuration
$config['components']['log']['targets'] = [
[
'class' => Rekurzia\Log\SentryTarget::class,
'levels' => ['error', 'warning'],
'dsn' => 'https://abcdefgh:[email protected]/1',
'includeContextMessage' => true,
'options' => [
'message_limit' => 2048,
],
],
];
Raven-compatible DSN.
These options will be passed to Raven_Client
constructor
This option allows you to hide info
level context message.
By default Yii generates also context message for you. It means that there will
be two messages logged to your Sentry instance on error. First with error
level, second with info
level.
MIT. See LICENSE file.