2017 © Pedro Peláez
 

library yii2-sentry

Yii2 sentry error handler

image

alex-salt/yii2-sentry

Yii2 sentry error handler

  • Friday, January 19, 2018
  • by alex_salt
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2,473 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 12 % Grown

The README.md

Yii2 Sentry error handler

Config

'components' => [
    'sentry' => [
        'class' => 'alexsalt\sentry\Client',
        'dsn' => '<your_dsn_url>',
        'options' => [
            'exclude' => [
                'yii\\web\\NotFoundHttpException',
                'yii\\web\\ForbiddenHttpException',
                'yii\\web\\UnauthorizedHttpException',
                'yii\\base\\InvalidRouteException',
            ],
        ],
    ],
    'errorHandler' => [
        'class' => 'alexsalt\sentry\ConsoleErrorHandler',
    ],
    'log' => [
        'targets' => [
            [
                'class' => 'alexsalt\\sentry\\LogTarget',
                'levels' => [ 'warning', 'error' ],
            ],
        ],
    ],
]

Use alexsalt\sentry\WebErrorHandler for web apps, (*1)

Logging

// basic
Yii::error('message');
// extra data
Yii::error([
    'msg' => 'message name',
    'data' => [
        'foo' => 'bar',
    ],
]);
// capture exception
try {
    throw new \Exception('test');
} catch (\Exception $e) {
    Yii::$app->errorHandler->logException($e);
}

The Versions

19/01 2018

dev-master

9999999-dev https://github.com/holycheater/yii2-sentry

Yii2 sentry error handler

  Sources   Download

MIT

The Requires

 

by Alex Salt

02/02 2017

1.1.1

1.1.1.0 https://github.com/holycheater/yii2-sentry

Yii2 sentry error handler

  Sources   Download

MIT

The Requires

 

by Alex Salt

02/02 2017

1.1.0

1.1.0.0 https://github.com/holycheater/yii2-sentry

Yii2 sentry error handler

  Sources   Download

MIT

The Requires

 

by Alex Salt

26/05 2016

v1.0.0

1.0.0.0 https://github.com/holycheater/yii2-sentry

Yii2 sentry error handler

  Sources   Download

MIT

The Requires

 

by Alex Salt