Voyager.HttpRequestLogger
0.0.8
See the version list below for details.
dotnet add package Voyager.HttpRequestLogger --version 0.0.8
NuGet\Install-Package Voyager.HttpRequestLogger -Version 0.0.8
<PackageReference Include="Voyager.HttpRequestLogger" Version="0.0.8" />
<PackageVersion Include="Voyager.HttpRequestLogger" Version="0.0.8" />
<PackageReference Include="Voyager.HttpRequestLogger" />
paket add Voyager.HttpRequestLogger --version 0.0.8
#r "nuget: Voyager.HttpRequestLogger, 0.0.8"
#addin nuget:?package=Voyager.HttpRequestLogger&version=0.0.8
#tool nuget:?package=Voyager.HttpRequestLogger&version=0.0.8
Voyager.HttpRequestLogger
Voyager.HttpRequestLogger is a middleware for logging HTTP requests using Serilog in ASP.NET Core applications. It supports logging request bodies for POST, PUT, and PATCH methods, and query strings for all HTTP methods.
Installation
Install the package via NuGet:
dotnet add package Voyager.HttpRequestLogger
Usage
- Configure Serilog in your
Program.cs
:
using Serilog;
using Serilog.Formatting.Compact;
Log.Logger = new LoggerConfiguration()
.WriteTo.Console(new CompactJsonFormatter())
.CreateLogger();
var builder = WebApplication.CreateBuilder(args);
builder.Host.UseSerilog();
- Add the Voyager.HttpRequestLogger middleware in your
Program.cs
:
var app = builder.Build();
app.UseVoyagerRequestLogging();
- Optionally, you can customize the logging by providing a custom enricher:
app.UseVoyagerRequestLogging((diagnosticContext, httpContext) =>
{
// Custom enrichment logic
});
Author
This project is maintained by Andrzej Świstowski.
License
This project is licensed under the MIT License.
Voyager.HttpRequestLogger
Voyager.HttpRequestLogger is a middleware for logging HTTP requests using Serilog in ASP.NET Core applications. It supports logging request bodies for POST, PUT, and PATCH methods, and query strings for all HTTP methods.
Installation
Install the package via NuGet:
dotnet add package Voyager.HttpRequestLogger
Usage
- Configure Serilog in your
Program.cs
:
using Serilog;
using Serilog.Formatting.Compact;
Log.Logger = new LoggerConfiguration()
.WriteTo.Console(new CompactJsonFormatter())
.CreateLogger();
var builder = WebApplication.CreateBuilder(args);
builder.Host.UseSerilog();
- Add the Voyager.HttpRequestLogger middleware in your
Program.cs
:
var app = builder.Build();
app.UseVoyagerLogging();
- Optionally, you can customize the logging by providing a custom enricher:
app.UseVoyagerRequestLogging((diagnosticContext, httpContext) =>
{
// Custom enrichment logic
});
Author
This project is maintained by Andrzej Świstowski.
License
This project is licensed under the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- Serilog.AspNetCore (>= 9.0.0)
-
net9.0
- Serilog.AspNetCore (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.