Skip to content

Conversation

@Meir017
Copy link
Contributor

@Meir017 Meir017 commented Jul 23, 2025

related to #2899

Replaces manual string interpolation with compile-time generated LoggerMessage methods for better performance and structured logging.

Adds 16 new LoggerMessage extension methods covering response logging and auto-configuration scenarios for Redis server connections.

Improves logging efficiency by eliminating runtime string formatting overhead and enables better log analysis through consistent message templates.

satisfying!

redis-logging-pr.mp4
image

Replaces manual string interpolation with compile-time generated LoggerMessage methods for better performance and structured logging.

Adds 16 new LoggerMessage extension methods covering response logging and auto-configuration scenarios for Redis server connections.

Improves logging efficiency by eliminating runtime string formatting overhead and enables better log analysis through consistent message templates.
@Meir017 Meir017 changed the title Migrates logging to structured LoggerMessage methods chore: Replaces string interpolation with structured logging - ResultProcessor Jul 23, 2025
{
server.ReplicaReadOnly = true;
Log?.LogInformation($"{Format.ToString(server)}: Auto-configured (CONFIG) read-only replica: true");
Log?.LogInformationAutoConfiguredConfigReadOnlyReplicaTrue(new(server));
Copy link
Collaborator

@mgravell mgravell Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we merge I have merged these two and make the true/false a bool parameter? I'm fine with the case changing if we use default logging

@mgravell
Copy link
Collaborator

LGTM (with tweak), thanks

@mgravell mgravell merged commit 3c236a4 into StackExchange:main Jul 24, 2025
5 of 6 checks passed
@Meir017 Meir017 deleted the chore/logger-message-attribute branch July 24, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants