From d98732f663e8b81427c2e1a6c4fd27d694ca6653 Mon Sep 17 00:00:00 2001 From: Jennifer Mourek Date: Wed, 12 Oct 2016 12:17:29 +0200 Subject: [PATCH] ErrorController: Don't log exceptions other than HTTP 500 fixes #12760 --- application/controllers/ErrorController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/application/controllers/ErrorController.php b/application/controllers/ErrorController.php index 86ee26554..101d48585 100644 --- a/application/controllers/ErrorController.php +++ b/application/controllers/ErrorController.php @@ -32,8 +32,6 @@ class ErrorController extends ActionController $error = $this->_getParam('error_handler'); $exception = $error->exception; /** @var \Exception $exception */ - Logger::error($exception); - Logger::error('Stacktrace: %s', $exception->getTraceAsString()); if (! ($isAuthenticated = $this->Auth()->isAuthenticated())) { $this->innerLayout = 'guest-error'; @@ -83,6 +81,7 @@ class ErrorController extends ActionController break; default: $this->getResponse()->setHttpResponseCode(500); + Logger::error($exception); break; } $this->view->message = $exception->getMessage();