diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-03-17 16:42:53 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-03-24 16:21:25 +0100 |
commit | 6be7aa112f6174c1406cfef5449836124a7f6f50 (patch) | |
tree | 5029bf9659caeab8702e9fabbbdeb9a2cd849bfa /lib/private/Files/Utils | |
parent | fbf1334dc8c192ebdd335663cacfb810daf4d841 (diff) | |
download | nextcloud-server-6be7aa112f6174c1406cfef5449836124a7f6f50.tar.gz nextcloud-server-6be7aa112f6174c1406cfef5449836124a7f6f50.zip |
Migrate from ILogger to LoggerInterface in lib/private
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Files/Utils')
-rw-r--r-- | lib/private/Files/Utils/Scanner.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php index 5b633617608..dc220bc710d 100644 --- a/lib/private/Files/Utils/Scanner.php +++ b/lib/private/Files/Utils/Scanner.php @@ -48,7 +48,7 @@ use OCP\Files\NotFoundException; use OCP\Files\Storage\IStorage; use OCP\Files\StorageNotAvailableException; use OCP\IDBConnection; -use OCP\ILogger; +use Psr\Log\LoggerInterface; /** * Class Scanner @@ -71,8 +71,7 @@ class Scanner extends PublicEmitter { /** @var IEventDispatcher */ private $dispatcher; - /** @var ILogger */ - protected $logger; + protected LoggerInterface $logger; /** * Whether to use a DB transaction @@ -92,9 +91,8 @@ class Scanner extends PublicEmitter { * @param string $user * @param IDBConnection|null $db * @param IEventDispatcher $dispatcher - * @param ILogger $logger */ - public function __construct($user, $db, IEventDispatcher $dispatcher, ILogger $logger) { + public function __construct($user, $db, IEventDispatcher $dispatcher, LoggerInterface $logger) { $this->user = $user; $this->db = $db; $this->dispatcher = $dispatcher; @@ -263,8 +261,7 @@ class Scanner extends PublicEmitter { } $propagator->commitBatch(); } catch (StorageNotAvailableException $e) { - $this->logger->error('Storage ' . $storage->getId() . ' not available'); - $this->logger->logException($e); + $this->logger->error('Storage ' . $storage->getId() . ' not available', ['exception' => $e]); $this->emit('\OC\Files\Utils\Scanner', 'StorageNotAvailable', [$e]); } if ($this->useTransaction) { |