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/dav | |
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/dav')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/File.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index e577510b69e..45b31c2e11d 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -156,7 +156,7 @@ class File extends Node implements IFile { try { $target = $partStorage->fopen($internalPartPath, 'wb'); if ($target === false) { - \OCP\Util::writeLog('webdav', '\OC\Files\Filesystem::fopen() failed', \OCP\Util::ERROR); + \OC::$server->getLogger()->error('\OC\Files\Filesystem::fopen() failed', ['app' => 'webdav']); // because we have no clue about the cause we can only throw back a 500/Internal Server Error throw new Exception('Could not write file contents'); } @@ -209,7 +209,7 @@ class File extends Node implements IFile { $fileExists = $storage->file_exists($internalPath); } if (!$run || $renameOkay === false || $fileExists === false) { - \OCP\Util::writeLog('webdav', 'renaming part file to final file failed ($run: ' . ( $run ? 'true' : 'false' ) . ', $renameOkay: ' . ( $renameOkay ? 'true' : 'false' ) . ', $fileExists: ' . ( $fileExists ? 'true' : 'false' ) . ')', \OCP\Util::ERROR); + \OC::$server->getLogger()->error('renaming part file to final file failed ($run: ' . ( $run ? 'true' : 'false' ) . ', $renameOkay: ' . ( $renameOkay ? 'true' : 'false' ) . ', $fileExists: ' . ( $fileExists ? 'true' : 'false' ) . ')', ['app' => 'webdav']); throw new Exception('Could not rename part file to final file'); } } catch (ForbiddenException $ex) { @@ -474,7 +474,7 @@ class File extends Node implements IFile { $renameOkay = $targetStorage->moveFromStorage($partStorage, $partInternalPath, $targetInternalPath); $fileExists = $targetStorage->file_exists($targetInternalPath); if ($renameOkay === false || $fileExists === false) { - \OCP\Util::writeLog('webdav', '\OC\Files\Filesystem::rename() failed', \OCP\Util::ERROR); + \OC::$server->getLogger()->error('\OC\Files\Filesystem::rename() failed', ['app' => 'webdav']); // only delete if an error occurred and the target file was already created if ($fileExists) { // set to null to avoid double-deletion when handling exception |