Open
Description
Noted in #1474, a bunch of our factories used to abstract our logging setup during initialization are IDisposable
and so have to call each other's Dispose()
methods, all due to the fact that we need to call Serilog.Log.CloseAndFlush()
at the end of the program. This is actually a place where referencing a global is perhaps a better pattern, since the logger is already global, but Serilog provides an even better option by passing the parameter dispose=true
when using SerilogLoggerFactoryExtensions.AddSerilog(dispose=true)
.