mythz
4
There’s an example for a Serilog enricher answered on StackOverflow at:
If your AppHost supports accessing the Request context via a singleton you can access it from:
HostContext.GetCurrentRequest()
However it’s disabled by default in .NET Core and requires registering a HttpContextAccessor
: