Skip to content

Documentation: Usage Instructions do not present the simplest way of setting up Serilog.AspNetCore #218

Open
@r3use

Description

@r3use

Is your feature request related to a problem? Please describe.

Comming to Serilog and .Net Core I had to spend hours of trying to find out the simplest way of Setting up Serilog and having it read it's configuration from the settings file is:

.UseSerilog((hostingContext, services, loggerConfiguration) => loggerConfiguration .ReadFrom.Configuration(hostingContext.Configuration))

Describe the solution you'd like

This setup should be shown FIRST in the installation instructions. Together with the simplest configuration which writes to a log file and the console.

Also .UseSerilog() should use the settings file for configuration by default.

Additional context

I've seen multiple tutorials and guides setting up Serilog as described in the instrustions when all they had to do was call .UseSerilog as described above. You only really find it in the documentation by luck or if you already know how to do it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions