aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-07-26 15:44:52 +0200
committerGitHub <noreply@github.com>2019-07-26 15:44:52 +0200
commit3ba33cab5b458e909d8f0c78ce46c99a7d8e148f (patch)
treee542ce58b0773f978af01b457d40a544414dd1d0
parent2e803dc3d37f8f5eebe3d262bd6cc25fe97e73cd (diff)
parent22f9a95814c289d77d07376384bf1144c7abc9ac (diff)
downloadnextcloud-server-3ba33cab5b458e909d8f0c78ce46c99a7d8e148f.tar.gz
nextcloud-server-3ba33cab5b458e909d8f0c78ce46c99a7d8e148f.zip
Merge pull request #16557 from nextcloud/enh/do_not_log_locked_files
Do not log locked files
-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);
}