diff options
author | Robin Appelman <robin@icewind.nl> | 2022-05-13 15:06:47 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-05-13 15:15:26 +0200 |
commit | eda997f2bd6e969753ca90c400b790427b2bf684 (patch) | |
tree | ef0818523ff1fd659b14e791c1ec46d61c546351 /lib/private/Diagnostics/EventLogger.php | |
parent | 52bb29bde117f13d8df106bdc6862efe12314448 (diff) | |
download | nextcloud-server-eda997f2bd6e969753ca90c400b790427b2bf684.tar.gz nextcloud-server-eda997f2bd6e969753ca90c400b790427b2bf684.zip |
only log diagnostic events if a treshhold is set
this prevents log spam and it's rare that you actually want to very short events logged anyway
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Diagnostics/EventLogger.php')
-rw-r--r-- | lib/private/Diagnostics/EventLogger.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Diagnostics/EventLogger.php b/lib/private/Diagnostics/EventLogger.php index c7b89002ea9..7b9bd9630ab 100644 --- a/lib/private/Diagnostics/EventLogger.php +++ b/lib/private/Diagnostics/EventLogger.php @@ -126,7 +126,7 @@ class EventLogger implements IEventLogger { $timeInMs = round($duration * 1000, 4); $loggingMinimum = (int)$this->config->getValue('diagnostics.logging.threshold', 0); - if ($loggingMinimum > 0 && $timeInMs < $loggingMinimum) { + if ($loggingMinimum === 0 || $timeInMs < $loggingMinimum) { return; } |