Refactor: structured logging and async best practices#39
Merged
Conversation
- Replace string interpolation in ILogger calls with structured logging message templates for better log aggregation and to avoid unnecessary string allocations when log level is disabled - Add ConfigureAwait(false) to async calls in library/service code to prevent potential deadlocks in synchronous-over-async contexts 27 files changed, 260 insertions(+), 260 deletions(-)
Sarmkadan
added a commit
that referenced
this pull request
Jul 11, 2026
Refactor: structured logging and async best practices
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$"...{var}..."string interpolation inILoggercalls with structured logging message templatesConfigureAwait(false)to async calls in library/service code (non-controller, non-middleware)Motivation
Structured logging: String interpolation causes unnecessary allocations when log level is disabled, and prevents log aggregation tools (Seq, ELK, Application Insights) from extracting parameters.
ConfigureAwait(false): Library code should not capture the synchronization context. Missing
ConfigureAwait(false)can cause deadlocks when library methods are called from synchronous-over-async code paths.Risk Assessment