From c0ce272e9c3a94ff98081c4f90a31ca611d28323 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Thu, 8 Feb 2024 15:47:39 +0100 Subject: chore: Migrate away from OC::$server->getLogger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/private/Cache/File.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/private/Cache') diff --git a/lib/private/Cache/File.php b/lib/private/Cache/File.php index 72fc95a802b..74e795cc377 100644 --- a/lib/private/Cache/File.php +++ b/lib/private/Cache/File.php @@ -60,7 +60,7 @@ class File implements ICache { $this->storage = new View('/' . $user->getUID() . '/cache'); return $this->storage; } else { - \OC::$server->get(LoggerInterface::class)->error('Can\'t get cache storage, user not logged in', ['app' => 'core']); + \OCP\Server::get(LoggerInterface::class)->error('Can\'t get cache storage, user not logged in', ['app' => 'core']); throw new \OC\ForbiddenException('Can\t get cache storage, user not logged in'); } } @@ -192,11 +192,11 @@ class File implements ICache { } } catch (\OCP\Lock\LockedException $e) { // ignore locked chunks - \OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', ['app' => 'core']); + \OCP\Server::get(LoggerInterface::class)->debug('Could not cleanup locked chunk "' . $file . '"', ['app' => 'core']); } catch (\OCP\Files\ForbiddenException $e) { - \OC::$server->getLogger()->debug('Could not cleanup forbidden chunk "' . $file . '"', ['app' => 'core']); + \OCP\Server::get(LoggerInterface::class)->debug('Could not cleanup forbidden chunk "' . $file . '"', ['app' => 'core']); } catch (\OCP\Files\LockNotAcquiredException $e) { - \OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', ['app' => 'core']); + \OCP\Server::get(LoggerInterface::class)->debug('Could not cleanup locked chunk "' . $file . '"', ['app' => 'core']); } } } -- cgit v1.2.3