ezoterik / yii2-rollbar-js
Integration Rollbar notifier for JavaScript
Installs: 31
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-11-22 07:56:00 UTC
README
This extension is the way to integrate Rollbar notifier for JavaScript with your Yii2 application.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist ezoterik/yii2-rollbar-js "~1.1.0"
or add
"ezoterik/yii2-rollbar-js": "~1.1.0"
to the require section of your composer.json
file.
Usage
- Add the component configuration in your web config file:
'bootstrap' => ['rollbarJs'], 'components' => [ 'rollbarJs' => [ 'class' => 'ezoterik\rollbarJs\Bootstrap', 'accessToken' => 'POST_CLIENT_ITEM_ACCESS_TOKEN', // You can specify client options (see https://rollbar.com/docs/notifier/rollbar.js/configuration): // 'clientOptions' => [ // 'logLevel' => 'error', // 'ignoredMessages' => ['Can\'t find Clippy.bmp. The end is nigh.'], // ], ], ],
or (deprecated method)
- Add the param in your params config file:
'rollbar' => [ 'postClientItemAccessToken' => 'POST_CLIENT_ITEM_ACCESS_TOKEN', ],
- Add the bootstrap class in your web config file:
'bootstrap' => ['ezoterik\rollbarJs\Bootstrap'],