Skip to content

Add request logging with client IP and user agent enrichment - #15

Merged
Lampjaw merged 2 commits into
mainfrom
request-logging
Nov 3, 2026
Merged

Lampjaw merged 2 commits into
mainfrom
request-logging

Conversation

@Lampjaw

@Lampjaw Lampjaw commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Summary

  • AddApplicationLogging now assigns Log.Logger and registers DiagnosticContext/IDiagnosticContext. Without these, UseSerilogRequestLogging logs nothing or fails at startup.
  • New UseApplicationRequestLogging() wraps UseSerilogRequestLogging and enriches each event with ClientIp and UserAgent. Add it after UseForwardedHeaders so the IP is the original requester.
  • Adds Serilog.AspNetCore and the ASP.NET Core framework reference to Voidwell.Common.Logging; the now-redundant Microsoft.Extensions.* package references are removed.
  • Adds .claude/ to .gitignore.

- AddApplicationLogging now assigns Log.Logger and registers DiagnosticContext
  and IDiagnosticContext so Serilog request logging works.
- Add UseApplicationRequestLogging, wrapping UseSerilogRequestLogging and
  enriching events with ClientIp and UserAgent.
- Add Serilog.AspNetCore and the ASP.NET Core framework reference.
- Ignore .claude/.

Claude-Session: https://claude.ai/code/session_018wBkddqqYhcLZhtjGCe6fA
@Lampjaw
Lampjaw merged commit 0065b57 into main Nov 3, 2026
3 checks passed
@Lampjaw
Lampjaw deleted the request-logging branch November 3, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant