Skip to content

Commit d092802

Browse files
authored
Merge pull request #16564 from nextcloud/backport/16557/stable16
[stable16] Do not log locked files
2 parents 5786c6c + 167a8d7 commit d092802

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

apps/dav/lib/Connector/Sabre/File.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
use OCP\Files\NotPermittedException;
5656
use OCP\Files\Storage;
5757
use OCP\Files\StorageNotAvailableException;
58+
use OCP\ILogger;
5859
use OCP\Lock\ILockingProvider;
5960
use OCP\Lock\LockedException;
6061
use OCP\Share\IManager;
@@ -229,7 +230,13 @@ public function put($data) {
229230
}
230231

231232
} catch (\Exception $e) {
232-
\OC::$server->getLogger()->logException($e);
233+
$context = [];
234+
235+
if ($e instanceof LockedException) {
236+
$context['level'] = ILogger::DEBUG;
237+
}
238+
239+
\OC::$server->getLogger()->logException($e, $context);
233240
if ($needsPartFile) {
234241
$partStorage->unlink($internalPartPath);
235242
}

0 commit comments

Comments
 (0)