Skip to content

Rubius/serilog-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rubius logo Rubius.Logging.Serilog

Logging configuration simplifier, enabling by a couple lines of code

How to use

  • 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();

    ...
}

About

Logging module with base configuration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages