diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-03-11 12:26:07 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-03-11 12:26:07 +0100 |
commit | 27f3aa5890ce8cc6ac142cac5d56d989c10537eb (patch) | |
tree | bdf1366c9d8a189306e44a55fd9279ac149b5d3a | |
parent | cec00df21c8d212c4eb07836972d2ac73aa1b59c (diff) | |
download | nextcloud-server-27f3aa5890ce8cc6ac142cac5d56d989c10537eb.tar.gz nextcloud-server-27f3aa5890ce8cc6ac142cac5d56d989c10537eb.zip |
Only log events when enabled in debug mode
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | lib/private/Diagnostics/EventLogger.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Diagnostics/EventLogger.php b/lib/private/Diagnostics/EventLogger.php index 02867b3b4b7..35cef0be3f5 100644 --- a/lib/private/Diagnostics/EventLogger.php +++ b/lib/private/Diagnostics/EventLogger.php @@ -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; } |