Skip to content

Commit

Permalink
fix: adding correct placeholders to all logging calls with parameters (
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillKurdyukov authored Sep 2, 2024
1 parent 03f0be8 commit 1a110a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/Ydb.Sdk/src/Driver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ private async Task<Status> DiscoverEndpoints()

var resultProto = response.Operation.Result.Unpack<ListEndpointsResult>();

_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
Expand Down
3 changes: 2 additions & 1 deletion src/Ydb.Sdk/src/Pool/EndpointPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1a110a2

Please sign in to comment.