mirror of
https://github.com/nextcloud/server.git
synced 2024-08-22 05:55:27 +02:00
Only log events when enabled in debug mode
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
cec00df21c
commit
27f3aa5890
@ -60,12 +60,13 @@ class EventLogger implements IEventLogger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function isLoggingActivated(): bool {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$isDebugLevel = $this->internalLogger->getLogLevel([]) === Log::DEBUG;
|
$isDebugLevel = $this->internalLogger->getLogLevel([]) === Log::DEBUG;
|
||||||
$systemValue = (bool)$this->config->getValue('diagnostics.logging', false);
|
|
||||||
return $systemValue && $isDebugLevel;
|
return $systemValue && $isDebugLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user