serilog-sinks-browserhttp
serilog-sinks-browserhttp copied to clipboard
Disposing the sink fails in the browser with `PlatformNotSupportedException`
E.g. when calling Log.CloseAndFlush()
:
at System.Threading.Tasks.Task.Wait()
at Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink.ResetSyncContextAndWait(Func`1 taskFactory)
at Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink.CloseAndFlush()
at Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink.Dispose(Boolean disposing)
at Serilog.Sinks.BrowserHttp.BrowserHttpSink.Dispose(Boolean disposing)
at Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink.Dispose()
It's likely this will require specific support in PeriodicBatchingSink
, but in the short term it may be better to grab the code from there, embed it in this library, and tweak until we're happy.