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

Support IEnumerable<KeyValuePair<string, object>> as state object #214

Closed
gkinsman opened this issue Mar 25, 2021 · 0 comments · Fixed by #215
Closed

Support IEnumerable<KeyValuePair<string, object>> as state object #214

gkinsman opened this issue Mar 25, 2021 · 0 comments · Fixed by #215
Labels
enhancement New feature or request
Milestone

Comments

@gkinsman
Copy link
Contributor

gkinsman commented Mar 25, 2021

Is your feature request related to a problem? Please describe.
Hi there!

Scope types of IEnumerable<KeyValuePair<string, object>> are currently being rendered as:

=> System.Collections.Generic.KeyValuePair2[System.String,System.Object][]

whereas Serilog and NLog treat them specially so that they're rendered as KeyValuePair's.

Describe the solution you'd like
In the context of this library, it would be great to be able to see the scope properties that are attached to log events. Although those other libraries go quite a long way to try and map scope objects to various structures, handling only the case above would be enough to support that use case in libraries.

Perhaps they could be rendered as:

=> Key: Value

Describe alternatives you've considered
You could take a dependency on Serilog for example and use this sink to emit structure, but it would be nice to have that built in to this library.

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 a pull request may close this issue.

2 participants