Only log events when enabled in debug mode

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Este commit está contenido en:
Julius Härtl 2022-03-11 12:26:07 +01:00
padre cec00df21c
commit 27f3aa5890
No se encontró ninguna clave conocida en la base de datos para esta firma
ID de clave GPG: 4C614C6ED2CDE6DF

Ver fichero

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