Merge pull request #3165 from nextcloud/backport/3151/stable22

[stable22] Always log generic exceptions
This commit is contained in:
Julius Härtl
2021-07-05 16:21:15 +02:00
committed by GitHub
+1 -3
View File
@@ -98,9 +98,7 @@ class ExceptionMiddleware extends Middleware {
'status' => 500, 'status' => 500,
'message' => $exception->getMessage() 'message' => $exception->getMessage()
]; ];
if ($this->config->getSystemValue('loglevel', Util::WARN) === Util::DEBUG) { $this->logger->logException($exception);
$this->logger->logException($exception);
}
if ($this->config->getSystemValue('debug', true) === true) { if ($this->config->getSystemValue('debug', true) === true) {
$response['exception'] = (array) $exception; $response['exception'] = (array) $exception;
} }