[icinga-checkins] icinga.org: icingaweb2/master: ErrorController: Don' t log exceptions other than HTTP 500

git at icinga.org git at icinga.org
Wed Oct 12 12:21:25 CEST 2016


Module: icingaweb2
Branch: master
Commit: d98732f663e8b81427c2e1a6c4fd27d694ca6653
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=d98732f663e8b81427c2e1a6c4fd27d694ca6653

Author: Jennifer Mourek <jennifer.mourek at netways.de>
Date:   Wed Oct 12 12:17:29 2016 +0200

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 86ee265..101d485 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();



More information about the icinga-checkins mailing list