[PM-20398] Add Notifications logging (#13640)

* Add Logging to know which notification transport is being used

* Remove debug log
This commit is contained in:
Justin Baur 2025-06-03 11:08:29 -04:00 committed by GitHub
parent 24ae013f71
commit 8a29df64d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
},
}),
);
}