Skip to content

Middleware does not work without the static Serilog.Log #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pnmcosta opened this issue May 18, 2020 · 2 comments
Closed

Middleware does not work without the static Serilog.Log #194

pnmcosta opened this issue May 18, 2020 · 2 comments
Labels

Comments

@pnmcosta
Copy link

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.

@pnmcosta pnmcosta added the bug label May 18, 2020
@pnmcosta
Copy link
Author

@pnmcosta
Copy link
Author

Duplicate of: #182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant