diff --git a/src/ZB.MOM.WW.ScadaBridge.Communication/Grpc/SitePairChannelProvider.cs b/src/ZB.MOM.WW.ScadaBridge.Communication/Grpc/SitePairChannelProvider.cs index d1330ecf..27b3dffa 100644 --- a/src/ZB.MOM.WW.ScadaBridge.Communication/Grpc/SitePairChannelProvider.cs +++ b/src/ZB.MOM.WW.ScadaBridge.Communication/Grpc/SitePairChannelProvider.cs @@ -180,7 +180,7 @@ public sealed class SitePairChannelProvider : IDisposable pair.FailbackOnProbation = false; pair.ResetFailback(); _logger.LogInformation( - "gRPC channel pair for site {SiteId} refreshed (nodeA={HasA}, nodeB={HasB})", + "gRPC channel pair for site {TargetSiteId} refreshed (nodeA={HasA}, nodeB={HasB})", siteId, pair.ChannelA is not null, pair.ChannelB is not null); } @@ -229,7 +229,7 @@ public sealed class SitePairChannelProvider : IDisposable if (!string.Equals(isA ? pair.RejectedAEndpoint : pair.RejectedBEndpoint, endpoint, StringComparison.Ordinal)) { _logger.LogError(buildError, - "Site {SiteId} {Field} '{Endpoint}' is not a usable gRPC endpoint ({Error}); keeping the " + "Site {TargetSiteId} {Field} '{Endpoint}' is not a usable gRPC endpoint ({Error}); keeping the " + "previous channel ({Previous}) for that node until the address is corrected", siteId, field, endpoint, error, (isA ? pair.NodeAEndpoint : pair.NodeBEndpoint) ?? "none"); SetRejected(pair, isA, endpoint); @@ -270,7 +270,7 @@ public sealed class SitePairChannelProvider : IDisposable pair.ChannelB = null; } _pskProvider.Invalidate(siteId); - _logger.LogInformation("gRPC channel pair for site {SiteId} removed", siteId); + _logger.LogInformation("gRPC channel pair for site {TargetSiteId} removed", siteId); } } @@ -334,7 +334,7 @@ public sealed class SitePairChannelProvider : IDisposable if (secondary is null) throw; // Only reads/idempotent operations or a provably unapplied request may replay. _logger.LogWarning( - "Site {SiteId} node {FromNode} unavailable; failing over to node {ToNode}", + "Site {TargetSiteId} node {FromNode} unavailable; failing over to node {ToNode}", siteId, primaryIsA ? "A" : "B", primaryIsA ? "B" : "A"); try { return await call(secondary, ct).ConfigureAwait(false); } catch (RpcException retryError) when (retryError.StatusCode == StatusCode.Unavailable @@ -388,7 +388,7 @@ public sealed class SitePairChannelProvider : IDisposable pair.FailbackOnProbation = true; pair.ProbationSinceUtc = DateTime.UtcNow; pair.NextProbeUtc = DateTime.MaxValue; - _logger.LogInformation("Site {SiteId} preferred node A ready again; failing back", siteId); + _logger.LogInformation("Site {TargetSiteId} preferred node A ready again; failing back", siteId); return true; } @@ -448,7 +448,7 @@ public sealed class SitePairChannelProvider : IDisposable } catch (Exception ex) { - _logger.LogDebug(ex, "Failback probe for site {SiteId} faulted", kvp.Key); + _logger.LogDebug(ex, "Failback probe for site {TargetSiteId} faulted", kvp.Key); } } }