]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only log events when enabled in debug mode 31538/head
authorJulius Härtl <jus@bitgrid.net>
Fri, 11 Mar 2022 11:26:07 +0000 (12:26 +0100)
committerJulius Härtl <jus@bitgrid.net>
Fri, 11 Mar 2022 11:26:07 +0000 (12:26 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
lib/private/Diagnostics/EventLogger.php

index 02867b3b4b741e9514f6ea696b8ea277955e408c..35cef0be3f5482b993f43e1752544be786f29a9c 100644 (file)
@@ -60,12 +60,13 @@ class EventLogger implements IEventLogger {
        }
 
        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;
        }