-
Notifications
You must be signed in to change notification settings - Fork 52
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
Background level check is not triggered #75
Comments
…round level checks occur.
Thanks for the follow-up @siabrac - sorry to hear you're still hitting issues. Is it possible you're creating more than one logging pipeline, i.e. calling I'll try reproducing this behaviour and let you know now I go thanks! |
Aha! I see you're using |
@nblumhardt I'm troubleshooting a very similar issue and came across this issue. Your comment about calling To give some more context, we're using StructureMap and using a service locator pattern that gets a new instance of the logger each time it's needed. |
G'day Stephen - yes, sounds like that is a likely cause, here. Using the |
@nblumhardt Our app is using a single configuration, but at the moment, each controller/service/etc. is getting a new instance of the same configuration to be able to set the ForContext on the logger. Does this design mean that we cannot take advantage of the logging level switch? Forgive me if this is not the appropriate forum for this question. |
@stphnlwlsh thanks for the follow-up! I might need to see the StructureMap/Serilog integration code to be able to get a handle on this, so opening a new issue with that info would help. You can definitely use both The sample code in serilog/serilog#995 might help, also. |
serilog/serilog#507 should have caused the sink to make a periodic "minimum level" check even when no events are queued. This does not work correctly as of 3.3.2 because the sink calls into
EmitBatch()
on an empty batch, notEmitBatchAsync()
which is the implemented method.The text was updated successfully, but these errors were encountered: