diff options
author | Joas Schilling <coding@schilljs.com> | 2020-07-31 17:25:33 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-08-03 14:38:45 +0300 |
commit | b6829acbaabb2e323fb0b0c12d0251485d2e8781 (patch) | |
tree | f7284c9bddd6ba39187e4fd58b15d8ac0751336e /lib/Activity | |
parent | dea5040713e0a574d5bf95152a10db656ac75757 (diff) |
Move to Psr\Log\LoggerInterface
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Activity')
-rw-r--r-- | lib/Activity/Listener.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Activity/Listener.php b/lib/Activity/Listener.php index 6a17d78f6..9928c53a9 100644 --- a/lib/Activity/Listener.php +++ b/lib/Activity/Listener.php @@ -31,9 +31,9 @@ use OCA\Talk\Room; use OCP\Activity\IManager; use OCP\AppFramework\Utility\ITimeFactory; use OCP\EventDispatcher\IEventDispatcher; -use OCP\ILogger; use OCP\IUser; use OCP\IUserSession; +use Psr\Log\LoggerInterface; class Listener { @@ -46,7 +46,7 @@ class Listener { /** @var ChatManager */ protected $chatManager; - /** @var ILogger */ + /** @var LoggerInterface */ protected $logger; /** @var ITimeFactory */ @@ -55,7 +55,7 @@ class Listener { public function __construct(IManager $activityManager, IUserSession $userSession, ChatManager $chatManager, - ILogger $logger, + LoggerInterface $logger, ITimeFactory $timeFactory) { $this->activityManager = $activityManager; $this->userSession = $userSession; @@ -151,7 +151,7 @@ class Listener { 'duration' => $duration, ]); } catch (\InvalidArgumentException $e) { - $this->logger->logException($e, ['app' => 'spreed']); + $this->logger->error($e->getMessage(), ['exception' => $e]); return false; } @@ -160,9 +160,9 @@ class Listener { $event->setAffectedUser($userId); $this->activityManager->publish($event); } catch (\BadMethodCallException $e) { - $this->logger->logException($e, ['app' => 'spreed']); + $this->logger->error($e->getMessage(), ['exception' => $e]); } catch (\InvalidArgumentException $e) { - $this->logger->logException($e, ['app' => 'spreed']); + $this->logger->error($e->getMessage(), ['exception' => $e]); } } @@ -194,7 +194,7 @@ class Listener { 'room' => $room->getId(), ]); } catch (\InvalidArgumentException $e) { - $this->logger->logException($e, ['app' => 'spreed']); + $this->logger->error($e->getMessage(), ['exception' => $e]); return; } @@ -216,9 +216,9 @@ class Listener { ->setAffectedUser($participant['userId']); $this->activityManager->publish($event); } catch (\InvalidArgumentException $e) { - $this->logger->logException($e, ['app' => 'spreed']); + $this->logger->error($e->getMessage(), ['exception' => $e]); } catch (\BadMethodCallException $e) { - $this->logger->logException($e, ['app' => 'spreed']); + $this->logger->error($e->getMessage(), ['exception' => $e]); } } } |