Skip to content

Add FormattableString Support to Logging Methods #4698

Description

@devlead

Add support for FormattableString to logging methods (Error, Warning, Information, Verbose, Debug) to enable type-safe string interpolation.

Example

// Current
Information("Processing {0} files in {1}", fileCount, duration);

// Proposed
Information($"Processing {fileCount} files in {duration}");

Add overloads accepting FormattableString and FormattableLogAction for all logging methods.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions