From 620fe053cda537d736e53456ee368f51d4aefc96 Mon Sep 17 00:00:00 2001 From: KirillKurdyukov Date: Mon, 2 Sep 2024 14:05:26 +0300 Subject: [PATCH 1/2] fix: adding correct placeholders to all logging calls with parameters --- src/Ydb.Sdk/src/Driver.cs | 3 ++- src/Ydb.Sdk/src/Pool/EndpointPool.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Ydb.Sdk/src/Driver.cs b/src/Ydb.Sdk/src/Driver.cs index d32b34ce..d15d6b1e 100644 --- a/src/Ydb.Sdk/src/Driver.cs +++ b/src/Ydb.Sdk/src/Driver.cs @@ -233,7 +233,8 @@ private async Task DiscoverEndpoints() var resultProto = response.Operation.Result.Unpack(); - _logger.LogInformation("Successfully discovered endpoints: {}, self location: {}, sdk info: {}", + _logger.LogInformation( + "Successfully discovered endpoints: {EndpointsCount}, self location: {SelfLocation}, sdk info: {SdkInfo}", resultProto.Endpoints.Count, resultProto.SelfLocation, _sdkInfo); _endpointPool.Reset(resultProto.Endpoints diff --git a/src/Ydb.Sdk/src/Pool/EndpointPool.cs b/src/Ydb.Sdk/src/Pool/EndpointPool.cs index 93b64e16..fbe02c10 100644 --- a/src/Ydb.Sdk/src/Pool/EndpointPool.cs +++ b/src/Ydb.Sdk/src/Pool/EndpointPool.cs @@ -129,7 +129,8 @@ public bool PessimizeEndpoint(string endpoint) _preferredEndpointCount = preferredEndpointCount; - _logger.LogWarning("Endpoint {Endpoint} was pessimized. New pessimization ratio: {} / {}", + _logger.LogWarning( + "Endpoint {Endpoint} was pessimized. New pessimization ratio: {PessimizedCount} / {EndpointsCount}", endpoint, pessimizedCount, _sortedByPriorityEndpoints.Length); return 100 * pessimizedCount > _sortedByPriorityEndpoints.Length * DiscoveryDegradationLimit; From 50f4fc4342c2a1058f82040164e6ae67eaa84eb7 Mon Sep 17 00:00:00 2001 From: KirillKurdyukov Date: Mon, 2 Sep 2024 14:28:57 +0300 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2417dc38..afe87fa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v0.6.2 +- Fixed bug: adding correct placeholders to all logging calls with parameters + ## v0.6.1 - Check status of the transport or server for an invalidated session - Fixed NPE in DescribeTable