From 4cc41cb4c78aa23f88a410c724bf1ee09d64a1c5 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 26 Jul 2019 14:55:13 +0200 Subject: [PATCH] Do not log all locked exceptions This can happen for valid reasons (multiple users writing at the same time) with for example the text app. Apps should properly handle it. No reason to log it by default. Signed-off-by: Roeland Jago Douma --- lib/private/Files/Storage/Common.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index 657a8ba611..4e95c594cf 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -715,7 +715,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { $provider->acquireLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type); } catch (LockedException $e) { if ($logger) { - $logger->logException($e); + $logger->logException($e, ['level' => ILogger::INFO]); } throw $e; } @@ -747,7 +747,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { $provider->releaseLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type); } catch (LockedException $e) { if ($logger) { - $logger->logException($e); + $logger->logException($e, ['level' => ILogger::INFO]); } throw $e; } @@ -778,7 +778,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { try { $provider->changeLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type); } catch (LockedException $e) { - \OC::$server->getLogger()->logException($e); + \OC::$server->getLogger()->logException($e, ['level' => ILogger::INFO]); throw $e; } }