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

1.1.0 2016-04-15 03:51 UTC

This package is auto-updated.

Last update: 2024-04-22 06:36:11 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

  1. 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)

  1. Add the param in your params config file:
'rollbar' => [
    'postClientItemAccessToken' => 'POST_CLIENT_ITEM_ACCESS_TOKEN',
],
  1. Add the bootstrap class in your web config file:
'bootstrap' => ['ezoterik\rollbarJs\Bootstrap'],