Skip to content

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

@gkinsman

Description

@gkinsman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions