dotnet / dotnet/aspnetcore

HttpLoggingMiddleware log connection properties

Open
#32,247 5 comments 1 reaction 0 assignees View on GitHub
area-middleware feature-diagnostics
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

HttpLoggingMiddleware will log headers, properties (method, path, query, etc.), and body. However it will not log any information about the connection (Remote IP, local IP, ports, client certificate, TLS version, etc.).

Here's an example from our docs where the remote IP is relevant in the request logs:
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-5.0#troubleshoot

Which fields should we make available to log, and what granularity should we provide in the enum to enable them?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.