PHP code example of oaksoftwaredev / yii-rollbar
1. Go to this page and download the library: Download oaksoftwaredev/yii-rollbar library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
oaksoftwaredev / yii-rollbar example snippets
// ...
'components' => array(
// ...
'rollbar' => array(
'class' => 'application.vendor.oaksoftwaredev.yii-rollbar.RollbarComponent', // adjust path if needed
'access_token' => 'your_serverside_rollbar_token',
),
),
'preload' => array('log', 'rollbar'),
'components' => array(
// ...
'errorHandler' => array(
'class' => 'application.vendor.oaksoftwaredev.yii-rollbar.RollbarErrorHandler',
// ...
),
),
'environment' => isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'cli_' . php_uname('n'),
'root' => 'root',
'components' => array(
// ...
'log' => array(
// ...
'routes' => array(
array(
'class' => 'application.vendor.oaksoftwaredev.yii-rollbar.RollbarLogRoute',
'levels' => 'error, warning, info',
// You may specify the name of the Rollbar Yii Component ('rollbar' by default)
'rollbarComponentName' => 'rollbar',
),
),
),
),
$ php composer.phar