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
I'm kicking the tyres on CreateBootstrapLogger so that we can pull our log sink config from a secure store. To support parallel test running we don't use a static logger and instead inject it, but I don't see an override of UseSerilog/AddSerilog that accepts both an ILogger and a reconfiguration callback.
This code appears to only check to see if the static logger exists - should there perhaps be an overload that just accepts an ILogger and checks if it or the static logger is reloadable? Happy to add it if this is the right way to go :)
Thanks for the note, @gkinsman! Sorry about the slow reply - just got back from a short vacation :-)
I might need a bit more context around what your test code looks like, I'm not sure I can really wrap my head around the scenario.
Just to try to fill in the picture - if you have an ILogger already in hand, could you (for example) try casting it to ReloadableLogger and call Reload yourself, before passing it through to AddSerilog?
Hi there!
I'm kicking the tyres on
CreateBootstrapLogger
so that we can pull our log sink config from a secure store. To support parallel test running we don't use a static logger and instead inject it, but I don't see an override ofUseSerilog
/AddSerilog
that accepts both anILogger
and a reconfiguration callback.This code appears to only check to see if the static logger exists - should there perhaps be an overload that just accepts an ILogger and checks if it or the static logger is reloadable? Happy to add it if this is the right way to go :)
serilog-extensions-hosting/src/Serilog.Extensions.Hosting/SerilogServiceCollectionExtensions.cs
Lines 141 to 144 in 52f29a6
The text was updated successfully, but these errors were encountered: