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

feat: Add ToString override to CorrelatedLogScope #110

Merged
merged 2 commits into from
Sep 8, 2024

Conversation

e-salmon
Copy link
Contributor

@e-salmon e-salmon commented Sep 6, 2024

Output to the default Console logger uses ToString on scope items. Without the override, the default output of the correlated scope is

...
 => Correlate.Extensions.LoggerExtensions+CorrelatedLogScope
...

when the output should be

 => CorrelationId:8157ca4b-38e2-4748-b9aa-df5b2c4d4340

The proposed override formats the output in a similar way to the Console logger.

Copy link
Owner

@skwasjer skwasjer left a comment

Choose a reason for hiding this comment

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

Thanks, how did this only come up now? :D

I've left one suggestion.

src/Correlate.Core/Extensions/LoggerExtensions.cs Outdated Show resolved Hide resolved
e-salmon and others added 2 commits September 8, 2024 16:50
Output to the default Console logger uses `ToString` on scope items.
@skwasjer
Copy link
Owner

skwasjer commented Sep 8, 2024

I've left one suggestion.

Addressed it myself and added coverage.

@skwasjer skwasjer enabled auto-merge (squash) September 8, 2024 14:53
@skwasjer skwasjer changed the title Add ToString override to CorrelatedLogScope feat: Add ToString override to CorrelatedLogScope Sep 8, 2024
@skwasjer skwasjer added the enhancement New feature or request label Sep 8, 2024
Copy link

sonarcloud bot commented Sep 8, 2024

@skwasjer skwasjer merged commit b979581 into skwasjer:main Sep 8, 2024
12 checks passed
@skwasjer
Copy link
Owner

skwasjer commented Sep 8, 2024

Published in v5.3.0

@e-salmon
Copy link
Contributor Author

e-salmon commented Sep 9, 2024

Fantastic. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants