Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adding correct placeholders to all logging calls with parameters #177

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading