aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2025-07-21 11:24:16 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2025-07-21 11:39:28 +0200
commit53a0cc9da08f2779c29e33c4525c32eef561a283 (patch)
tree90be5dfe76db27413ad77d7ee5be9c6b526b9732
parentdc48b6b9acb40abf717014d4e65db668d55218fa (diff)
downloadnextcloud-server-bug/noid/group-imip-logs-in-sentry.tar.gz
nextcloud-server-bug/noid/group-imip-logs-in-sentry.zip
fix(imip): group messages by logging principal and uri as contextbug/noid/group-imip-logs-in-sentry
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
-rw-r--r--lib/private/Calendar/Manager.php10
-rw-r--r--tests/lib/Calendar/ManagerTest.php4
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/private/Calendar/Manager.php b/lib/private/Calendar/Manager.php
index 0e2a3f5f679..7da1379809d 100644
--- a/lib/private/Calendar/Manager.php
+++ b/lib/private/Calendar/Manager.php
@@ -403,7 +403,10 @@ class Manager implements IManager {
}
if (empty($found)) {
- $this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $vEvent->{'UID'}->getValue());
+ $this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar', [
+ 'principalUri' => $principalUri,
+ 'eventUid' => $vEvent->{'UID'}->getValue(),
+ ]);
return false;
}
@@ -518,7 +521,10 @@ class Manager implements IManager {
}
if (empty($found)) {
- $this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $vEvent->{'UID'}->getValue());
+ $this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar', [
+ 'principalUri' => $principalUri,
+ 'eventUid' => $vEvent->{'UID'}->getValue(),
+ ]);
return false;
}
diff --git a/tests/lib/Calendar/ManagerTest.php b/tests/lib/Calendar/ManagerTest.php
index fec2cfa0efe..eeaca0dfeb6 100644
--- a/tests/lib/Calendar/ManagerTest.php
+++ b/tests/lib/Calendar/ManagerTest.php
@@ -1075,7 +1075,7 @@ class ManagerTest extends TestCase {
$calendarData->add('METHOD', 'REPLY');
// construct logger return
$this->logger->expects(self::once())->method('warning')
- ->with('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $calendarData->VEVENT->UID->getValue());
+ ->with('iMip message event could not be processed because no corresponding event was found in any calendar', ['principalUri' => $principalUri, 'eventUid' => $calendarData->VEVENT->UID->getValue()]);
// Act
$result = $manager->handleIMipReply($principalUri, $sender, $recipient, $calendarData->serialize());
// Assert
@@ -1523,7 +1523,7 @@ class ManagerTest extends TestCase {
$calendarData->add('METHOD', 'CANCEL');
// construct logger return
$this->logger->expects(self::once())->method('warning')
- ->with('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $calendarData->VEVENT->UID->getValue());
+ ->with('iMip message event could not be processed because no corresponding event was found in any calendar', ['principalUri' => $principalUri, 'eventUid' => $calendarData->VEVENT->UID->getValue()]);
// Act
$result = $manager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $calendarData->serialize());
// Assert