From 27f3aa5890ce8cc6ac142cac5d56d989c10537eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 11 Mar 2022 12:26:07 +0100 Subject: [PATCH] Only log events when enabled in debug mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Diagnostics/EventLogger.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/private/Diagnostics/EventLogger.php b/lib/private/Diagnostics/EventLogger.php index 02867b3b4b741..35cef0be3f548 100644 --- a/lib/private/Diagnostics/EventLogger.php +++ b/lib/private/Diagnostics/EventLogger.php @@ -60,12 +60,13 @@ public function __construct(SystemConfig $config, LoggerInterface $logger, Log $ } public function isLoggingActivated(): bool { - if ($this->config->getValue('debug', false)) { + $systemValue = (bool)$this->config->getValue('diagnostics.logging', false); + + if ($systemValue && $this->config->getValue('debug', false)) { return true; } $isDebugLevel = $this->internalLogger->getLogLevel([]) === Log::DEBUG; - $systemValue = (bool)$this->config->getValue('diagnostics.logging', false); return $systemValue && $isDebugLevel; }