Skip to content

Commit 2dd72a7

Browse files
committed
NotificationService.php, Notifier.php: Fix usage of invalid logging functions
1 parent 5381a42 commit 2dd72a7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/Notification/Notifier.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function getName(): string {
5454
* @param INotification $notification
5555
* @param string $languageCode The code of the language that should be used to prepare the notification
5656
* @return INotification
57-
* @throws \InvalidArgumentException When the notification was not prepared by a notifier
57+
* @throws InvalidArgumentException When the notification was not prepared by a notifier
5858
* @throws AlreadyProcessedException When the notification is not needed anymore and should be deleted
5959
* @since 9.0.0
6060
*/
@@ -65,7 +65,7 @@ public function prepare(INotification $notification, string $languageCode): INot
6565
try {
6666
$secret = $this->secretService->find($notification->getObjectId(), $notification->getUser());
6767
} catch (Exception $e) {
68-
$this->logger->logException($e);
68+
$this->logger->error('Could not find secret for creating retrieval notification: ' . $e->getMessage(), ['exception' => $e]);
6969
throw new AlreadyProcessedException();
7070
}
7171

lib/Service/NotificationService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function notifyRetrieved(Secret $secret) {
4444
->setSubject(Application::APP_ID, ['secret' => $secret->getUuid()]);
4545
$this->notificationManager->notify($notification);
4646
} catch (\Exception $e) {
47-
$this->logger->logException($e, ['app' => Application::APP_ID]);
47+
$this->logger->error('Failed to create notification for secret retrieval: ' . $e->getMessage(), ['exception' => $e]);
4848
}
4949

5050
}

0 commit comments

Comments
 (0)