Browse Source

Only log events when enabled in debug mode

Signed-off-by: Julius Härtl <jus@bitgrid.net>
tags/v24.0.0beta1
Julius Härtl 2 years ago
parent
commit
27f3aa5890
No account linked to committer's email address
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      lib/private/Diagnostics/EventLogger.php

+ 3
- 2
lib/private/Diagnostics/EventLogger.php View 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;
}


Loading…
Cancel
Save