Logging configuration simplifier, enabling by a couple lines of code
- Add base configuration calling the extension method
AddSerilogLoggingModule(this ILoggingBuilder builder)
private static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
...
.ConfigureLogging(builder => builder.AddSerilogLoggingModule())
...;
- Use HTTP request logging calling the extension method
UseSerilogHttpRequestLoggingModule(this IApplicationBuilder app)
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
...
app.UseSerilogRequestLoggingModule();
...
}