Skip to content

Request for Logging Internals to be public again #35060

@JakenVeina

Description

@JakenVeina

Use case: I'd like to have a LoggerMessage.Define() method that accepts more than 5 type args. I'm perfectly happy to implement this myself, by just copying how the others are done, in my own project, and adding more type args. However, the existing implementations rely on the internal LogValuesFormatter class, which used to be public within a .Internals namespace.

For now, my solution is simply to copy/paste the entire LogValuesFormatter class into my own project, which just seems like a waste.

Alternatively, could we simply get LoggerMessage.Define() methods that take more type args? Perhaps up to 8, like Action<T>, Func<T>, ValueTuple<T> etc? Is there some particular performance reason that more than 5 type args would be disadvantageous?

I'm happy to PR this myself, so long as no one is opposed to the change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-approvedAPI was approved in API review, it can be implementedarea-Extensions-Logginghelp wanted[up-for-grabs] Good issue for external contributors

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions