serilog-enrichers-aspnetcore-httpcontext icon indicating copy to clipboard operation
serilog-enrichers-aspnetcore-httpcontext copied to clipboard

Enriches Serilog events with Aspnetcore HttpContext.

Results 6 serilog-enrichers-aspnetcore-httpcontext issues
Sort by recently updated
recently updated
newest added

In serilog.aspnetcore nuget package you can do this: ``` app.UseSerilogRequestLogging(options => { options.EnrichDiagnosticContext = (diagnosticContext, httpContext) => { diagnosticContext.Set("UserAgent", httpContext.Request.Headers["User-Agent"].ToString()); diagnosticContext.Set("HttpRequestClientHostIP", httpContext.Connection.RemoteIpAddress); diagnosticContext.Set("HttpRequestUrl", httpContext.Request.GetDisplayUrl()); diagnosticContext.Set("UserName", httpContext.User.Identity.Name == null ? "(anonymous)"...

The current version doesn't work with .Net Core v3.1. Nothing is parsed in the output.

as this nuget uses HttpContextAccessor to get the http context properties, it cause 404 to next incoming request as the http-method becomes empty string. please see https://github.com/aspnet/KestrelHttpServer/issues/2591 for more details....

This extension is the best I've found so far for logging httpContext in .net core. I couldn't get the others to work correctly. Is there a way to only include...

When I moved the LoggerConfiguration to the UseSerilog method I was unable to log the start and end time of the host, in Program.cs, Log in this file no longer...

I was able to write to the console, but when I modified to write the log in MSSqlServer nothing appeared. I think it has to do with outputTemplate, right? Is...