From 8a29df64d9c762802bf41e95c4c0267dc746dd51 Mon Sep 17 00:00:00 2001 From: Justin Baur <19896123+justindbaur@users.noreply.github.com> Date: Tue, 3 Jun 2025 11:08:29 -0400 Subject: [PATCH] [PM-20398] Add Notifications logging (#13640) * Add Logging to know which notification transport is being used * Remove debug log --- .../internal/default-notifications.service.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libs/common/src/platform/notifications/internal/default-notifications.service.ts b/libs/common/src/platform/notifications/internal/default-notifications.service.ts index 4cbc8227364..ff22173a26e 100644 --- a/libs/common/src/platform/notifications/internal/default-notifications.service.ts +++ b/libs/common/src/platform/notifications/internal/default-notifications.service.ts @@ -108,14 +108,19 @@ export class DefaultNotificationsService implements NotificationsServiceAbstract return this.webPushConnectionService.supportStatus$(userId); }), supportSwitch({ - supported: (service) => - service.notifications$.pipe( + supported: (service) => { + this.logService.info("Using WebPush for notifications"); + return service.notifications$.pipe( catchError((err: unknown) => { this.logService.warning("Issue with web push, falling back to SignalR", err); return this.connectSignalR$(userId, notificationsUrl); }), - ), - notSupported: () => this.connectSignalR$(userId, notificationsUrl), + ); + }, + notSupported: () => { + this.logService.info("Using SignalR for notifications"); + return this.connectSignalR$(userId, notificationsUrl); + }, }), ); }