If slack log url not set then not log to slack (#166)

This commit is contained in:
formsdev 2023-08-10 20:19:36 +05:30 committed by GitHub
parent 8f84faf3d1
commit 7e75343495
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -70,7 +70,7 @@ class Handler extends ExceptionHandler
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);
}

View File

@ -55,6 +55,7 @@ return [
],
'slack' => [
'enabled' => env('LOG_SLACK_WEBHOOK_URL') ? true : false,
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'OpenForm Log',