This package has been discontinued due to the very minimal amount of code required to do this directly; to attach RequestId
to Owin requests:
In your Serilog configuration, add Enrich.FromLogContext()
:
Log.Logger = new LoggerConfiguration()
.Enrich.FromLogContext()
// Other sink configuration etc.
app.Use(new Func<AppFunc, AppFunc>(next => (async env =>
{
using (LogContext.PushProperty("RequestId", Guid.NewGuid()))
await next.Invoke(env);
})));
(For other ways to add middleware to Owin apps, see this post.