]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not log all locked exceptions 16558/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Fri, 26 Jul 2019 12:55:13 +0000 (14:55 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Fri, 26 Jul 2019 12:55:13 +0000 (14:55 +0200)
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 <roeland@famdouma.nl>
lib/private/Files/Storage/Common.php

index 657a8ba611abe017a60c5a2d5f8e0bc3eef5ff7c..4e95c594cfa3b89abd690b25a50175e689b6a23f 100644 (file)
@@ -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;
                }
        }