diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-04-23 08:04:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-23 08:04:50 +0200 |
commit | a80fcf177bdc9c8be79f20c4102af2a8f9016ca8 (patch) | |
tree | 885905ee525a49c5ea851eab79fa976940c693ef /apps/files_sharing | |
parent | a74fbe78a71cbffdd069ede1c2614ed2862039e4 (diff) | |
parent | dd34cb75404fb806da7e780bc5804fc958a75456 (diff) | |
download | nextcloud-server-a80fcf177bdc9c8be79f20c4102af2a8f9016ca8.tar.gz nextcloud-server-a80fcf177bdc9c8be79f20c4102af2a8f9016ca8.zip |
Merge pull request #9255 from nextcloud/less-deprecated-calls
Less deprecated calls to OCP\Util::writeLog
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/ShareBackend/File.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/lib/SharedMount.php | 8 |
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; |