Skip to content

feat: support BeginScope of Microsoft.Extensions.Logging for Structured Logs #5222

@Flash0ver

Description

@Flash0ver

Description

Summary

Attach state
and FormattedLogValues (IReadOnlyList<KeyValuePair<string, object?>> or IEnumerable<KeyValuePair<string, object?>>)
provided via the IDisposable-returning BeginScope (instance and extension) methods
as Attributes to Logs.

Remarks

APIs to support

Consider using Microsoft.Extensions.Logging.IExternalScopeProvider as implementation detail.

Consider supporting a boolean IncludeScopes option, that e.g. the Console-Logger exposes.

See docs at Logging in C# and .NET > Log scopes.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions