/serilog-aspnetcore-middleware

A middleware for aspnetcore to log httpcontext data with serilog

Primary LanguageC#MIT LicenseMIT

serilog-aspnetcore-middleware · NuGet PRs Welcome GitHub license

A middleware for aspnetcore to log httpcontext data with serilog.

Installation

Install-Package Serilog.Aspnetcore.Middleware

Usage example

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
  app.UseHttpContextLogger();
  ...
}

You'll have a log event per request with all HttpContext informations including request & response body

alt text

Settings

Soon...

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request