mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
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>
This commit is contained in:
parent
686d16a56b
commit
30b0a0272b
2 changed files with 3 additions and 1 deletions
|
|
@ -2128,6 +2128,8 @@ $CONFIG = [
|
|||
|
||||
/**
|
||||
* Limit diagnostics event logging to events longer than the configured threshold in ms
|
||||
*
|
||||
* when set to 0 no diagnostics events will be logged
|
||||
*/
|
||||
'diagnostics.logging.threshold' => 0,
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue