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/User/Manager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/private/User') diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index 705f5fbe66b..96edf624628 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -56,6 +56,7 @@ use OCP\User\Backend\ISearchKnownUsersBackend; use OCP\User\Events\BeforeUserCreatedEvent; use OCP\User\Events\UserCreatedEvent; use OCP\UserInterface; +use Psr\Log\LoggerInterface; /** * Class Manager @@ -235,7 +236,7 @@ class Manager extends PublicEmitter implements IUserManager { $result = $this->checkPasswordNoLogging($loginName, $password); if ($result === false) { - \OC::$server->getLogger()->warning('Login failed: \''. $loginName .'\' (Remote IP: \''. \OC::$server->getRequest()->getRemoteAddress(). '\')', ['app' => 'core']); + \OCP\Server::get(LoggerInterface::class)->warning('Login failed: \''. $loginName .'\' (Remote IP: \''. \OC::$server->getRequest()->getRemoteAddress(). '\')', ['app' => 'core']); } return $result; -- cgit v1.2.3