serilog-web / classic

[Discontinued] Serilog web request logging and enrichment for classic ASP.NET applications
Apache License 2.0
79 stars 32 forks source link

Add Http Data To All Logging Events #72

Closed bsulliva closed 3 years ago

bsulliva commented 4 years ago

Hello, this package adds a new logging event for each HTTP request that occurs. I was wondering if it's possible to add the HTTP logging to all logging events, so we can have the HTTP data available to us. So if I log some data, Log.Information("Testing"), the HTTP data gets added to it too.

Thanks

tsimbalar commented 3 years ago

Hi,

Sorry I don't think we'd want to do this as this would generate heavy events.

The usual approach is to have "one fat event" with the http specific data, and have a correlation id shared across all events of that same HTTP request, so you can get to that data somehow.

Closing it, but happy to discuss it 👍