Skip to content

Argument ordering on configuration lambda #22

@ralphhendriks

Description

@ralphhendriks

In #20 (still in beta package) a new overload of UseSerilog() has been introduced

UseSerilog(
    this IHostBuilder builder,
    Action<HostBuilderContext, IServiceProvider, LoggerConfiguration> configureLogger,
    bool preserveStaticLogger = false,
    bool writeToProviders = false)

in addition to the already existing (publicly released)

UseSerilog(
    this IHostBuilder builder,
    Action<HostBuilderContext, LoggerConfiguration> configureLogger,
    bool preserveStaticLogger = false,
    bool writeToProviders = false)

Wouldn't it be more logical to change the ordering of the arguments on the configureLogging lambda of the newly added overload to HostBuilderContext, LoggerConfiguration, IServiceProvider? That makes refactoring of code just a little easier. I can contribute a PR, but only of course if this aligns with the views of the maintainers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions