Skip to content

Latest commit

 

History

History

README.md

uBeac.Web.Logging: Implement HTTP Logging in ASP.NET Core

Nuget version Nuget downloads

Using uBeac.Web.Logging you can log and store HTTP request/response.

Start

Install the package with NuGet:

dotnet add package uBeac.Web.Logging

Add Middleware

Just put the following code in Program.cs:

app.UseHttpLoggingMiddleware();

Implement Repository / Store

You must implement IHttpLoggingRepository to store logs:

public class HttpLoggingRepository : IHttpLoggingRepository
{
}

And register it in dependency container:

builder.Services.AddScoped<IHttpLoggingRepository, HttpLoggingRepository>();

Or you can use the following packages: