yii2-extension yii2-rollbar-simple
Rollbar for Yii2
gelige/yii2-rollbar-simple
Rollbar for Yii2
- Thursday, February 15, 2018
- by gelige
- Repository
- 1 Watchers
- 0 Stars
- 10 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 0 % Grown
Rollbar for Yii2 (simple)
, (*1)
Simple Rollbar logger your Yii2 application., (*2)
Installation
Through composer:, (*3)
To install, either run
$ php composer.phar require gelige/yii2-rollbar-simple:1.0.*
or add
"gelige/yii2-rollbar-simple": "1.0.*"
to the require section of your composer.json file., (*4)
Usage
-
Add the component configuration in your global main.php config file:, (*5)
'components' => [
'rollbar' => [
'class' => 'gelige\yii\rollbar\Rollbar',
'accessToken' => 'POST_SERVER_ITEM_ACCESS_TOKEN',
],
],
-
Add a new log target in your global main.php config file:, (*6)
'components' => [
'log' => [
'targets' => [
'class' => 'gelige\yii\rollbar\RollbarTarget',
// 'except' => ['yii\web\HttpException:404'],
// 'levels' => YII_DEBUG ? ['error', 'warning'] : ['error'],
],
],
],