mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Merge pull request #12329 from snipe/fixes/rollbar_integration
Fixed rollbar integration if ROLLBAR_TOKEN is provided
This commit is contained in:
commit
2eac03db4a
|
@ -4,7 +4,7 @@ use Monolog\Handler\NullHandler;
|
||||||
use Monolog\Handler\StreamHandler;
|
use Monolog\Handler\StreamHandler;
|
||||||
use Monolog\Handler\SyslogUdpHandler;
|
use Monolog\Handler\SyslogUdpHandler;
|
||||||
|
|
||||||
return [
|
$config = [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -35,6 +35,8 @@ return [
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'channels' => [
|
'channels' => [
|
||||||
|
// This will get overwritten to 'single' AND 'rollbar' in the code at the bottom of this file
|
||||||
|
// if a ROLLBAR_TOKEN is given in the .env file
|
||||||
'stack' => [
|
'stack' => [
|
||||||
'driver' => 'stack',
|
'driver' => 'stack',
|
||||||
'channels' => ['single'],
|
'channels' => ['single'],
|
||||||
|
@ -104,7 +106,23 @@ return [
|
||||||
'scimtrace' => [
|
'scimtrace' => [
|
||||||
'driver' => 'single',
|
'driver' => 'single',
|
||||||
'path' => storage_path('logs/scim.log')
|
'path' => storage_path('logs/scim.log')
|
||||||
]
|
],
|
||||||
|
|
||||||
|
'rollbar' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'handler' => \Rollbar\Laravel\MonologHandler::class,
|
||||||
|
'access_token' => env('ROLLBAR_TOKEN'),
|
||||||
|
'level' => env('ROLLBAR_LEVEL', 'error'),
|
||||||
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
// Only add rollbar if the .env has a rollbar token
|
||||||
|
if (env('ROLLBAR_TOKEN')) {
|
||||||
|
$config['channels']['stack']['channels'] = ['single', 'rollbar'];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $config;
|
Loading…
Reference in a new issue