From b7f4e20ffcdef13fb34b0238723b9e8113117edb Mon Sep 17 00:00:00 2001 From: Josh Date: Sat, 25 May 2024 09:07:43 -0400 Subject: [PATCH] fix(db): Log loong transaction times at debug level Signed-off-by: Josh --- lib/private/DB/Connection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php index e636585ac3586..db24e96e1e1f2 100644 --- a/lib/private/DB/Connection.php +++ b/lib/private/DB/Connection.php @@ -698,7 +698,7 @@ public function commit() { $timeTook = microtime(true) - $this->transactionActiveSince; $this->transactionActiveSince = null; if ($timeTook > 1) { - $this->logger->warning('Transaction took ' . $timeTook . 's', ['exception' => new \Exception('Transaction took ' . $timeTook . 's')]); + $this->logger->debug('Transaction took ' . $timeTook . 's', ['exception' => new \Exception('Transaction took ' . $timeTook . 's')]); } } return $result; @@ -710,7 +710,7 @@ public function rollBack() { $timeTook = microtime(true) - $this->transactionActiveSince; $this->transactionActiveSince = null; if ($timeTook > 1) { - $this->logger->warning('Transaction rollback took longer than 1s: ' . $timeTook, ['exception' => new \Exception('Long running transaction rollback')]); + $this->logger->debug('Transaction rollback took longer than 1s: ' . $timeTook, ['exception' => new \Exception('Long running transaction rollback')]); } } return $result;