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; }