You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Middleware relies on the static Serilog.Log instead of the one defined with the extension method UseSerilog.
Reproduction
Set UseSerilog with your own static logger, the middleware does not emit any event logs.
Expected behavior
I would hope the middleware would use the same logger set wtih UseSerilog, otherwise, please extend RequestLoggingOptions so that we can also define there what logger should be used to create the context for the middleware.
Relevant package, tooling and runtime versions <PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
Additional context
With your guidance, I'd happily do a PR for this.
The text was updated successfully, but these errors were encountered:
Description
Middleware relies on the static
Serilog.Log
instead of the one defined with the extension methodUseSerilog
.Reproduction
Set
UseSerilog
with your own static logger, the middleware does not emit any event logs.Expected behavior
I would hope the middleware would use the same logger set wtih
UseSerilog
, otherwise, please extendRequestLoggingOptions
so that we can also define there what logger should be used to create the context for the middleware.Relevant package, tooling and runtime versions
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
Additional context
With your guidance, I'd happily do a PR for this.
The text was updated successfully, but these errors were encountered: