Skip to content

Commit 954b6c6

Browse files
committed
chore: use $this->logger and prevent Server::get
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent 0f96a2c commit 954b6c6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/private/Files/Storage/DAV.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ public function fopen(string $path, string $mode) {
346346
if ($response->getStatusCode() === Http::STATUS_LOCKED) {
347347
throw new \OCP\Lock\LockedException($path);
348348
} else {
349-
Server::get(LoggerInterface::class)->error('Guzzle get returned status code ' . $response->getStatusCode(), ['app' => 'webdav client']);
349+
$this->logger->error('Guzzle get returned status code ' . $response->getStatusCode(), ['app' => 'webdav client']);
350350
}
351351
}
352352

@@ -773,7 +773,7 @@ public function hasUpdated(string $path, int $time): bool {
773773
* @throws ForbiddenException if the action is not allowed
774774
*/
775775
protected function convertException(Exception $e, string $path = ''): void {
776-
Server::get(LoggerInterface::class)->debug($e->getMessage(), ['app' => 'files_external', 'exception' => $e]);
776+
$this->logger->debug($e->getMessage(), ['app' => 'files_external', 'exception' => $e]);
777777
if ($e instanceof ClientHttpException) {
778778
if ($e->getHttpStatus() === Http::STATUS_LOCKED) {
779779
throw new \OCP\Lock\LockedException($path);

0 commit comments

Comments
 (0)