Skip to content

Middleware that allows for logging of requests and responses in ASP.NET Core.

License

Notifications You must be signed in to change notification settings

alexalok/RequestResponseLoggingMiddleware

Repository files navigation

Nuget

About

This middleware allows for logging of requests and responses in ASP.NET Core applications.

Usage

Install NuGet package

Install-Package AspNetCore.RequestResponseLoggingMiddleware

Use middleware in Startup.cs:

 app.UseRequestResponseLogging(ctx =>
 {
     var path = ctx.Request.Path;
     return path.StartsWithSegments("/needs-to-be-logged", StringComparison.InvariantCultureIgnoreCase);
 });

app.UseRouting();

Note that app.UseRequestResponseLogging() should be called as early as possible.

About

Middleware that allows for logging of requests and responses in ASP.NET Core.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages