Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-07-26 15:29:13 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-07-26 15:29:13 +0300
commit22f9a95814c289d77d07376384bf1144c7abc9ac (patch)
tree1bf8e68524f726186d21a2bab0724f7c94176b66 /apps/dav/lib/Connector/Sabre/File.php
parentb2341cdfd02b3e8ad90f8ae41320f708c3d54bb6 (diff)
Do not log locked files
This is the code doing its job. There is no need to spam the log file with this. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/File.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/File.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php
index f183013f91f..d336df98306 100644
--- a/apps/dav/lib/Connector/Sabre/File.php
+++ b/apps/dav/lib/Connector/Sabre/File.php
@@ -55,6 +55,7 @@ use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\Files\Storage;
use OCP\Files\StorageNotAvailableException;
+use OCP\ILogger;
use OCP\Lock\ILockingProvider;
use OCP\Lock\LockedException;
use OCP\Share\IManager;
@@ -229,7 +230,13 @@ class File extends Node implements IFile {
}
} catch (\Exception $e) {
- \OC::$server->getLogger()->logException($e);
+ $context = [];
+
+ if ($e instanceof LockedException) {
+ $context['level'] = ILogger::DEBUG;
+ }
+
+ \OC::$server->getLogger()->logException($e, $context);
if ($needsPartFile) {
$partStorage->unlink($internalPartPath);
}