credy / yii2-errbit
Logs errors to [errbit](https://github.com/errbit/errbit)
1.0.1
2024-11-12 16:22 UTC
Requires
- emgiezet/errbit-php: ^1.0.5
- npm-asset/airbrake--browser: ^1.1.0
- yiisoft/yii2: ~2.0.4
Requires (Dev)
- codeception/codeception: ^4.0.0
- codeception/module-asserts: ^1.0.0
- credy/tc-coding-standard: dev-master
- dealerdirect/phpcodesniffer-composer-installer: ^0.7.2
Replaces
- nkovacs/yii2-errbit: ^0.1.0
This package is auto-updated.
Last update: 2024-12-13 11:27:00 UTC
README
Logs errors to errbit
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist credy/yii2-errbit "*"
or add
"credy/yii2-errbit": "*"
to the require section of your composer.json
file.
Usage
Replace the default error handler with either \credy\errbit\WebErrorHandler
or \credy\errbit\ConsoleErrorHandler
:
...
'components' => [
'errorHandler' => [
'class' => credy\errbit\ConsoleErrorHandler::className(),
'errbitApiKey' => 'apikey',
'errbitHost' => 'test.example.org',
],
],
...
or
...
'components' => [
'errorHandler' => [
'class' => credy\errbit\ConsoleErrorHandler::className(),
'errbitApiKey' => 'apikey',
'errbitHost' => 'test.example.org',
],
],
...
You can pass additional options to errbitPHP:
...
'components' => [
'errorHandler' => [
'class' => credy\errbit\ConsoleErrorHandler::className(),
'errbitApiKey' => 'apikey',
'errbitHost' => 'test.example.org',
'errbit' => [
'environment_name' => 'development',
],
],
],
...
To enable the js notifier:
...
'components' => [
'errorHandler' => [
'class' => credy\errbit\WebErrorHandler::className(),
'errbitApiKey' => 'apikey',
'errbitHost' => 'test.example.org',
'jsNotifier' => true,
],
],
...
You can pass additional options to the js plugin using the jsOptions
property.
If the controller implements UserInfoInterface
, the information returned by getErrbitUserInfo
will also be
sent to errbit.