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
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);
}