diff options
Diffstat (limited to 'apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php')
-rw-r--r-- | apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php b/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php index 3d4e4dd5e6b..7f1e78248d3 100644 --- a/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php +++ b/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php @@ -32,7 +32,7 @@ use OCP\AppFramework\Utility\ITimeFactory; use OCP\BackgroundJob\IJobList; use OCP\BackgroundJob\QueuedJob; use OCP\IDBConnection; -use OCP\ILogger; +use Psr\Log\LoggerInterface; /** * Class BuildReminderIndexBackgroundJob @@ -47,8 +47,7 @@ class BuildReminderIndexBackgroundJob extends QueuedJob { /** @var ReminderService */ private $reminderService; - /** @var ILogger */ - private $logger; + private LoggerInterface $logger; /** @var IJobList */ private $jobList; @@ -58,16 +57,10 @@ class BuildReminderIndexBackgroundJob extends QueuedJob { /** * BuildReminderIndexBackgroundJob constructor. - * - * @param IDBConnection $db - * @param ReminderService $reminderService - * @param ILogger $logger - * @param IJobList $jobList - * @param ITimeFactory $timeFactory */ public function __construct(IDBConnection $db, ReminderService $reminderService, - ILogger $logger, + LoggerInterface $logger, IJobList $jobList, ITimeFactory $timeFactory) { parent::__construct($timeFactory); @@ -126,7 +119,7 @@ class BuildReminderIndexBackgroundJob extends QueuedJob { try { $this->reminderService->onCalendarObjectCreate($row); } catch (\Exception $ex) { - $this->logger->logException($ex); + $this->logger->error($ex->getMessage(), ['exception' => $ex]); } if (($this->timeFactory->getTime() - $startTime) > 15) { |