From 903c1e329d0a84e42f6b850262c885f17fb101ac Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sun, 11 Nov 2018 17:57:55 +1030 Subject: [PATCH] Stop logging errors that use a custom view Having a custom view implies that a friendly message is displayed to the user, in which case we can bet that the exception won't need to be "debugged" per se. --- src/Http/Middleware/HandleErrorsWithView.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Http/Middleware/HandleErrorsWithView.php b/src/Http/Middleware/HandleErrorsWithView.php index 27e2118ac..960074f39 100644 --- a/src/Http/Middleware/HandleErrorsWithView.php +++ b/src/Http/Middleware/HandleErrorsWithView.php @@ -81,11 +81,10 @@ class HandleErrorsWithView implements Middleware $status = $errorCode; } - // Log the exception (with trace) - $this->logger->debug($error); - if (! $this->view->exists($name = "flarum.forum::error.$status")) { $name = 'flarum.forum::error.default'; + + $this->logger->error($error); } $view = $this->view->make($name)