diff options
Diffstat (limited to 'apps/dav/lib/CardDAV/PhotoCache.php')
-rw-r--r-- | apps/dav/lib/CardDAV/PhotoCache.php | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/apps/dav/lib/CardDAV/PhotoCache.php b/apps/dav/lib/CardDAV/PhotoCache.php index d3e4b2450d3..66391b268a6 100644 --- a/apps/dav/lib/CardDAV/PhotoCache.php +++ b/apps/dav/lib/CardDAV/PhotoCache.php @@ -34,7 +34,7 @@ use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; use OCP\Files\SimpleFS\ISimpleFile; use OCP\Files\SimpleFS\ISimpleFolder; -use OCP\ILogger; +use Psr\Log\LoggerInterface; use Sabre\CardDAV\Card; use Sabre\VObject\Document; use Sabre\VObject\Parameter; @@ -54,16 +54,12 @@ class PhotoCache { /** @var IAppData */ protected $appData; - /** @var ILogger */ - protected $logger; + protected LoggerInterface $logger; /** * PhotoCache constructor. - * - * @param IAppData $appData - * @param ILogger $logger */ - public function __construct(IAppData $appData, ILogger $logger) { + public function __construct(IAppData $appData, LoggerInterface $logger) { $this->appData = $appData; $this->logger = $logger; } @@ -216,8 +212,8 @@ class PhotoCache { $vObject = $this->readCard($node->get()); return $this->getPhotoFromVObject($vObject); } catch (\Exception $e) { - $this->logger->logException($e, [ - 'message' => 'Exception during vcard photo parsing' + $this->logger->error('Exception during vcard photo parsing', [ + 'exception' => $e ]); } return false; @@ -262,8 +258,8 @@ class PhotoCache { 'body' => $val ]; } catch (\Exception $e) { - $this->logger->logException($e, [ - 'message' => 'Exception during vcard photo parsing' + $this->logger->error('Exception during vcard photo parsing', [ + 'exception' => $e ]); } return false; |