Download the PHP package fl0v/yii2-rollbar without Composer
On this page you can find all versions of the php package fl0v/yii2-rollbar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fl0v/yii2-rollbar
More information about fl0v/yii2-rollbar
Files in fl0v/yii2-rollbar
Package yii2-rollbar
Short Description Rollbar for Yii2
License
Homepage http://github.com/fl0v/yii2-rollbar
Informations about the package yii2-rollbar
Rollbar for Yii2
This extension is a fork from baibaratsky/yii2-rollbar and eroteev/yii2-rollbar. For Yii 1.x use baibaratsky/yii-rollbar.
Installation
The preferred way to install this extension is through composer.
To install, either run
or add
to the require
section of your composer.json
file.
Usage
-
Add the component configuration in your global config file:
-
Add the web error handler configuration in your web config file:
- Add the console error handler configuration in your console config file:
Payload from your exceptions
If you want your exceptions to send some additional data to Rollbar,
it is possible by implementing PayloadInterface
.
Log Target
You may want to collect your logs produced by Yii::error()
, Yii::info()
, etc. in Rollbar.
Put the following code in your config:
Rollbar Javascript
Rollbar offers Javascript debugger aswell, see https://docs.rollbar.com/docs/javascript.
To use it in Yii2 there is fl0v\yii2\rollbar\RollbarAsset
that you can register in your main template.
RollbarAsset is used independently of the server side component, to configure it use assetManager. For the config part of RollbarAsset checkout Rollbar reference https://docs.rollbar.com/docs/rollbarjs-configuration-reference#section-reference.