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
When using async sinks with multiple sinks dispose does not work.
The async sink tries to dispose its childs but the child is a SafeAggregateSink that is not disposable and therefore breaking the cleanup. as SafeAggregateSink is part of the core I opened the bug here.
Reproduction
varlogger=newConfiguration().WriteTo.Async(a =>a.WriteTo.File("test.log").WriteTo.Console()).CreateLogger();logger.Dispose();logger=newConfiguration().WriteTo.Async(a =>a.WriteTo.File("test.log")).CreateLogger();// throws file in use exception
Expected behavior
the first logger should be disposed correctly
Relevant package, tooling and runtime versions
serilog.core