mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Fixed rollbar integration
This commit is contained in:
parent
3873f14971
commit
e9ee9ea2e9
|
@ -52,7 +52,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
public function register()
|
||||
{
|
||||
|
||||
if (($this->app->environment('production')) && (config('services.rollbar.access_token'))){
|
||||
if (($this->app->environment('production')) && (config('logging.channels.rollbar.access_token'))){
|
||||
$this->app->register(\Rollbar\Laravel\RollbarServiceProvider::class);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
use Monolog\Handler\StreamHandler;
|
||||
|
||||
return [
|
||||
|
||||
$config = [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -15,7 +16,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
'default' => 'stack',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -51,6 +52,14 @@ return [
|
|||
'days' => env('APP_LOG_MAX_FILES', 5),
|
||||
],
|
||||
|
||||
'rollbar' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => \Rollbar\Laravel\MonologHandler::class,
|
||||
'access_token' => env('ROLLBAR_TOKEN'),
|
||||
'level' => env('APP_LOG_LEVEL', 'debug'),
|
||||
],
|
||||
|
||||
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
|
@ -85,3 +94,10 @@ return [
|
|||
],
|
||||
|
||||
];
|
||||
|
||||
if ((env('APP_ENV')=='production') && env('ROLLBAR_TOKEN')) {
|
||||
array_push($config['channels']['stack']['channels'], 'rollbar');
|
||||
}
|
||||
|
||||
|
||||
return $config;
|
||||
|
|
|
@ -50,10 +50,6 @@ return [
|
|||
'stripe_id' => env('STUNNING_STRIPE_ID'),
|
||||
],
|
||||
|
||||
'rollbar' => [
|
||||
'access_token' => env('ROLLBAR_TOKEN'),
|
||||
'level' => env('ROLLBAR_LEVEL', 'error'),
|
||||
],
|
||||
|
||||
'google' => [
|
||||
'maps_api_key' => env('GOOGLE_MAPS_API')
|
||||
|
|
Loading…
Reference in a new issue