diff options
author | Joas Schilling <coding@schilljs.com> | 2020-07-31 16:25:33 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-08-03 13:38:45 +0200 |
commit | b6829acbaabb2e323fb0b0c12d0251485d2e8781 (patch) | |
tree | f7284c9bddd6ba39187e4fd58b15d8ac0751336e /lib/Notification/Listener.php | |
parent | dea5040713e0a574d5bf95152a10db656ac75757 (diff) |
Move to Psr\Log\LoggerInterface
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Notification/Listener.php')
-rw-r--r-- | lib/Notification/Listener.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Notification/Listener.php b/lib/Notification/Listener.php index 9ae172c73..02cd0aaf7 100644 --- a/lib/Notification/Listener.php +++ b/lib/Notification/Listener.php @@ -30,9 +30,9 @@ use OCA\Talk\Room; use OCP\AppFramework\Utility\ITimeFactory; use OCP\EventDispatcher\IEventDispatcher; use OCP\Notification\IManager; -use OCP\ILogger; use OCP\IUser; use OCP\IUserSession; +use Psr\Log\LoggerInterface; class Listener { @@ -44,7 +44,7 @@ class Listener { protected $userSession; /** @var ITimeFactory */ protected $timeFactory; - /** @var ILogger */ + /** @var LoggerInterface */ protected $logger; /** @var bool */ @@ -54,7 +54,7 @@ class Listener { IEventDispatcher $dispatcher, IUserSession $userSession, ITimeFactory $timeFactory, - ILogger $logger) { + LoggerInterface $logger) { $this->notificationManager = $notificationManager; $this->dispatcher = $dispatcher; $this->userSession = $userSession; @@ -129,7 +129,7 @@ class Listener { 'actorId' => $actor->getUID(), ]); } catch (\InvalidArgumentException $e) { - $this->logger->logException($e, ['app' => 'spreed']); + $this->logger->error($e->getMessage(), ['exception' => $e]); if ($shouldFlush) { $this->notificationManager->flush(); } @@ -146,7 +146,7 @@ class Listener { $notification->setUser($participant['userId']); $this->notificationManager->notify($notification); } catch (\InvalidArgumentException $e) { - $this->logger->logException($e, ['app' => 'spreed']); + $this->logger->error($e->getMessage(), ['exception' => $e]); } } @@ -174,7 +174,7 @@ class Listener { ->setSubject('invitation'); $this->notificationManager->markProcessed($notification); } catch (\InvalidArgumentException $e) { - $this->logger->logException($e, ['app' => 'spreed']); + $this->logger->error($e->getMessage(), ['exception' => $e]); return; } } @@ -229,7 +229,7 @@ class Listener { ]) ->setDateTime($dateTime); } catch (\InvalidArgumentException $e) { - $this->logger->logException($e, ['app' => 'spreed']); + $this->logger->error($e->getMessage(), ['exception' => $e]); if ($shouldFlush) { $this->notificationManager->flush(); } @@ -246,7 +246,7 @@ class Listener { $notification->setUser($userId); $this->notificationManager->notify($notification); } catch (\InvalidArgumentException $e) { - $this->logger->logException($e, ['app' => 'spreed']); + $this->logger->error($e->getMessage(), ['exception' => $e]); } } @@ -274,7 +274,7 @@ class Listener { ->setSubject('call'); $this->notificationManager->markProcessed($notification); } catch (\InvalidArgumentException $e) { - $this->logger->logException($e, ['app' => 'spreed']); + $this->logger->error($e->getMessage(), ['exception' => $e]); return; } } |