diff --git a/LiveControlGateway/LifetimeManager/HubLifetimeManager.cs b/LiveControlGateway/LifetimeManager/HubLifetimeManager.cs index 79d8ac50..282b892b 100644 --- a/LiveControlGateway/LifetimeManager/HubLifetimeManager.cs +++ b/LiveControlGateway/LifetimeManager/HubLifetimeManager.cs @@ -60,6 +60,7 @@ ILoggerFactory loggerFactory public async Task TryAddDeviceConnection(byte tps, IHubController hubController, CancellationToken cancellationToken) { + _logger.LogDebug("Adding hub lifetime [{HubId}]", hubController.Id); var isSwapping = false; HubLifetime? hubLifetime; @@ -87,10 +88,12 @@ public async Task TryAddDeviceConnection(byte tps, IHubController hubContr if (isSwapping) { + _logger.LogTrace("Swapping hub lifetime [{HubId}]", hubController.Id); await hubLifetime.Swap(hubController); } else { + _logger.LogTrace("Initializing hub lifetime [{HubId}]", hubController.Id); if (!await hubLifetime.InitAsync(cancellationToken)) { // If we fail to initialize, the hub must be removed @@ -129,6 +132,7 @@ private HubLifetime CreateNewLifetime(byte tps, IHubController hubController) /// public async Task RemoveDeviceConnection(IHubController hubController, bool notifyLiveControlClients = true) { + _logger.LogDebug("Removing hub lifetime [{HubId}]", hubController.Id); HubLifetime? hubLifetime; using (await _lifetimesLock.LockAsyncScoped())