If slack log url not set then not log to slack (#166)
This commit is contained in:
parent
8f84faf3d1
commit
7e75343495
|
@ -70,7 +70,7 @@ class Handler extends ExceptionHandler
|
||||||
|
|
||||||
public function render($request, Throwable $e)
|
public function render($request, Throwable $e)
|
||||||
{
|
{
|
||||||
if ($this->shouldReport($e) && !in_array(\App::environment(),['testing'])) {
|
if ($this->shouldReport($e) && !in_array(\App::environment(),['testing']) && config('logging.channels.slack.enabled')) {
|
||||||
Log::channel('slack')->error($e);
|
Log::channel('slack')->error($e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,7 @@ return [
|
||||||
],
|
],
|
||||||
|
|
||||||
'slack' => [
|
'slack' => [
|
||||||
|
'enabled' => env('LOG_SLACK_WEBHOOK_URL') ? true : false,
|
||||||
'driver' => 'slack',
|
'driver' => 'slack',
|
||||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||||
'username' => 'OpenForm Log',
|
'username' => 'OpenForm Log',
|
||||||
|
|
Loading…
Reference in New Issue