1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 06:13:38 +00:00

[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

View File

@@ -108,14 +108,19 @@ export class DefaultNotificationsService implements NotificationsServiceAbstract
return this.webPushConnectionService.supportStatus$(userId); return this.webPushConnectionService.supportStatus$(userId);
}), }),
supportSwitch({ supportSwitch({
supported: (service) => supported: (service) => {
service.notifications$.pipe( this.logService.info("Using WebPush for notifications");
return service.notifications$.pipe(
catchError((err: unknown) => { catchError((err: unknown) => {
this.logService.warning("Issue with web push, falling back to SignalR", err); this.logService.warning("Issue with web push, falling back to SignalR", err);
return this.connectSignalR$(userId, notificationsUrl); return this.connectSignalR$(userId, notificationsUrl);
}), }),
), );
notSupported: () => this.connectSignalR$(userId, notificationsUrl), },
notSupported: () => {
this.logService.info("Using SignalR for notifications");
return this.connectSignalR$(userId, notificationsUrl);
},
}), }),
); );
} }