diff --git a/src/Core/Services/Implementations/MultiServicePushNotificationService.cs b/src/Core/Services/Implementations/MultiServicePushNotificationService.cs index dc14d38d2d..73e9c4f62c 100644 --- a/src/Core/Services/Implementations/MultiServicePushNotificationService.cs +++ b/src/Core/Services/Implementations/MultiServicePushNotificationService.cs @@ -15,12 +15,14 @@ namespace Bit.Core.Services private readonly List _services = new List(); private readonly IDeviceRepository _deviceRepository; private readonly IInstallationDeviceRepository _installationDeviceRepository; + private readonly ILogger _logger; public MultiServicePushNotificationService( IDeviceRepository deviceRepository, IInstallationDeviceRepository installationDeviceRepository, GlobalSettings globalSettings, IHttpContextAccessor httpContextAccessor, + ILogger logger, ILogger relayLogger, ILogger hubLogger) { @@ -30,12 +32,15 @@ namespace Bit.Core.Services globalSettings.Installation?.Id != null && CoreHelpers.SettingHasValue(globalSettings.Installation?.Key)) { + _logger.LogInformation(Constants.BypassFiltersEventId, "Use RelayPushNotificationService"); _services.Add(new RelayPushNotificationService(_deviceRepository, globalSettings, httpContextAccessor, relayLogger)); } if(CoreHelpers.SettingHasValue(globalSettings.InternalIdentityKey) && CoreHelpers.SettingHasValue(globalSettings.BaseServiceUri.InternalNotifications)) { + _logger.LogInformation(Constants.BypassFiltersEventId, + "Use NotificationsApiPushNotificationService"); _services.Add(new NotificationsApiPushNotificationService( globalSettings, httpContextAccessor, hubLogger)); } @@ -55,6 +60,7 @@ namespace Bit.Core.Services _deviceRepository = deviceRepository; _installationDeviceRepository = installationDeviceRepository; + _logger = logger; } public Task PushSyncCipherCreateAsync(Cipher cipher, IEnumerable collectionIds) diff --git a/src/Core/Services/Implementations/RelayPushNotificationService.cs b/src/Core/Services/Implementations/RelayPushNotificationService.cs index dc309c06f8..17cf8844ea 100644 --- a/src/Core/Services/Implementations/RelayPushNotificationService.cs +++ b/src/Core/Services/Implementations/RelayPushNotificationService.cs @@ -43,6 +43,7 @@ namespace Bit.Core.Services public async Task PushSyncCipherUpdateAsync(Cipher cipher, IEnumerable collectionIds) { + _logger.LogInformation(Constants.BypassFiltersEventId, "Relay PushSyncCipherUpdateAsync"); await PushCipherAsync(cipher, PushType.SyncCipherUpdate, collectionIds); }