gelige/yii2-rollbar-simple

Rollbar for Yii2

v1.0.1 2018-02-15 12:41 UTC

This package is not auto-updated.

Last update: 2024-04-14 03:06:48 UTC


README

Dependency Status Packagist

Simple Rollbar logger your Yii2 application.

Installation

Through composer:

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.

Usage

  1. Add the component configuration in your global main.php config file:
'components' => [
    'rollbar' => [
        'class' => 'gelige\yii\rollbar\Rollbar',
        'accessToken' => 'POST_SERVER_ITEM_ACCESS_TOKEN',
    ],
],
  1. Add a new log target in your global main.php config file:
'components' => [
    'log' => [
        'targets' => [
            'class' => 'gelige\yii\rollbar\RollbarTarget',
            // 'except' => ['yii\web\HttpException:404'],
            // 'levels' => YII_DEBUG ? ['error', 'warning'] : ['error'],
        ],
    ],
],