mirror of
https://github.com/bitwarden/server.git
synced 2024-11-25 12:45:18 +01:00
testing: more logs
This commit is contained in:
parent
ce36b95df5
commit
e2be61da0a
@ -15,12 +15,14 @@ namespace Bit.Core.Services
|
|||||||
private readonly List<IPushNotificationService> _services = new List<IPushNotificationService>();
|
private readonly List<IPushNotificationService> _services = new List<IPushNotificationService>();
|
||||||
private readonly IDeviceRepository _deviceRepository;
|
private readonly IDeviceRepository _deviceRepository;
|
||||||
private readonly IInstallationDeviceRepository _installationDeviceRepository;
|
private readonly IInstallationDeviceRepository _installationDeviceRepository;
|
||||||
|
private readonly ILogger<MultiServicePushNotificationService> _logger;
|
||||||
|
|
||||||
public MultiServicePushNotificationService(
|
public MultiServicePushNotificationService(
|
||||||
IDeviceRepository deviceRepository,
|
IDeviceRepository deviceRepository,
|
||||||
IInstallationDeviceRepository installationDeviceRepository,
|
IInstallationDeviceRepository installationDeviceRepository,
|
||||||
GlobalSettings globalSettings,
|
GlobalSettings globalSettings,
|
||||||
IHttpContextAccessor httpContextAccessor,
|
IHttpContextAccessor httpContextAccessor,
|
||||||
|
ILogger<MultiServicePushNotificationService> logger,
|
||||||
ILogger<RelayPushNotificationService> relayLogger,
|
ILogger<RelayPushNotificationService> relayLogger,
|
||||||
ILogger<NotificationsApiPushNotificationService> hubLogger)
|
ILogger<NotificationsApiPushNotificationService> hubLogger)
|
||||||
{
|
{
|
||||||
@ -30,12 +32,15 @@ namespace Bit.Core.Services
|
|||||||
globalSettings.Installation?.Id != null &&
|
globalSettings.Installation?.Id != null &&
|
||||||
CoreHelpers.SettingHasValue(globalSettings.Installation?.Key))
|
CoreHelpers.SettingHasValue(globalSettings.Installation?.Key))
|
||||||
{
|
{
|
||||||
|
_logger.LogInformation(Constants.BypassFiltersEventId, "Use RelayPushNotificationService");
|
||||||
_services.Add(new RelayPushNotificationService(_deviceRepository, globalSettings,
|
_services.Add(new RelayPushNotificationService(_deviceRepository, globalSettings,
|
||||||
httpContextAccessor, relayLogger));
|
httpContextAccessor, relayLogger));
|
||||||
}
|
}
|
||||||
if(CoreHelpers.SettingHasValue(globalSettings.InternalIdentityKey) &&
|
if(CoreHelpers.SettingHasValue(globalSettings.InternalIdentityKey) &&
|
||||||
CoreHelpers.SettingHasValue(globalSettings.BaseServiceUri.InternalNotifications))
|
CoreHelpers.SettingHasValue(globalSettings.BaseServiceUri.InternalNotifications))
|
||||||
{
|
{
|
||||||
|
_logger.LogInformation(Constants.BypassFiltersEventId,
|
||||||
|
"Use NotificationsApiPushNotificationService");
|
||||||
_services.Add(new NotificationsApiPushNotificationService(
|
_services.Add(new NotificationsApiPushNotificationService(
|
||||||
globalSettings, httpContextAccessor, hubLogger));
|
globalSettings, httpContextAccessor, hubLogger));
|
||||||
}
|
}
|
||||||
@ -55,6 +60,7 @@ namespace Bit.Core.Services
|
|||||||
|
|
||||||
_deviceRepository = deviceRepository;
|
_deviceRepository = deviceRepository;
|
||||||
_installationDeviceRepository = installationDeviceRepository;
|
_installationDeviceRepository = installationDeviceRepository;
|
||||||
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task PushSyncCipherCreateAsync(Cipher cipher, IEnumerable<Guid> collectionIds)
|
public Task PushSyncCipherCreateAsync(Cipher cipher, IEnumerable<Guid> collectionIds)
|
||||||
|
@ -43,6 +43,7 @@ namespace Bit.Core.Services
|
|||||||
|
|
||||||
public async Task PushSyncCipherUpdateAsync(Cipher cipher, IEnumerable<Guid> collectionIds)
|
public async Task PushSyncCipherUpdateAsync(Cipher cipher, IEnumerable<Guid> collectionIds)
|
||||||
{
|
{
|
||||||
|
_logger.LogInformation(Constants.BypassFiltersEventId, "Relay PushSyncCipherUpdateAsync");
|
||||||
await PushCipherAsync(cipher, PushType.SyncCipherUpdate, collectionIds);
|
await PushCipherAsync(cipher, PushType.SyncCipherUpdate, collectionIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user