summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-04-20 14:35:37 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-04-22 20:41:49 +0200
commitdd34cb75404fb806da7e780bc5804fc958a75456 (patch)
tree9a8298a0e72f004ed3ff90984f2f19c509b4c007 /apps/files_sharing
parent8748e636f69c290926a297a24d21b248ad58de53 (diff)
downloadnextcloud-server-dd34cb75404fb806da7e780bc5804fc958a75456.tar.gz
nextcloud-server-dd34cb75404fb806da7e780bc5804fc958a75456.zip
Less deprecated calls to OCP\Util::writeLog
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/ShareBackend/File.php2
-rw-r--r--apps/files_sharing/lib/SharedMount.php8
2 files changed, 3 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/ShareBackend/File.php b/apps/files_sharing/lib/ShareBackend/File.php
index dc1018f88a5..bb28c1a33ac 100644
--- a/apps/files_sharing/lib/ShareBackend/File.php
+++ b/apps/files_sharing/lib/ShareBackend/File.php
@@ -229,7 +229,7 @@ class File implements \OCP\Share_Backend_File_Dependent {
if (isset($fileOwner)) {
$source['fileOwner'] = $fileOwner;
} else {
- \OCP\Util::writeLog('files_sharing', "No owner found for reshare", \OCP\Util::ERROR);
+ \OC::$server->getLogger()->error('No owner found for reshare', ['app' => 'files_sharing']);
}
return $source;
diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php
index d90673421cd..1f5b7eaa13e 100644
--- a/apps/files_sharing/lib/SharedMount.php
+++ b/apps/files_sharing/lib/SharedMount.php
@@ -167,9 +167,7 @@ class SharedMount extends MountPoint implements MoveableMount {
// it is not a file relative to data/user/files
if (count($split) < 3 || $split[1] !== 'files') {
- \OCP\Util::writeLog('file sharing',
- 'Can not strip userid and "files/" from path: ' . $path,
- \OCP\Util::ERROR);
+ \OC::$server->getLogger()->error('Can not strip userid and "files/" from path: ' . $path, ['app' => 'files_sharing']);
throw new \OCA\Files_Sharing\Exceptions\BrokenPath('Path does not start with /user/files', 10);
}
@@ -198,9 +196,7 @@ class SharedMount extends MountPoint implements MoveableMount {
$this->setMountPoint($target);
$this->storage->setMountPoint($relTargetPath);
} catch (\Exception $e) {
- \OCP\Util::writeLog('file sharing',
- 'Could not rename mount point for shared folder "' . $this->getMountPoint() . '" to "' . $target . '"',
- \OCP\Util::ERROR);
+ \OC::$server->getLogger()->logException($e, ['app' => 'files_sharing', 'message' => 'Could not rename mount point for shared folder "' . $this->getMountPoint() . '" to "' . $target . '"']);
}
return $result;