[Bug Report] AsyncPoolSink
may lose the last log records and panic on program exit
#64
Labels
bug
Something isn't working
Context: #63
Minimum reproducible example
Expected to see a log record in
/tmp/async_file_sink.log
but nothing there.A guess is because the
main
function returns beforeAsyncPoolSink
receives the last log task.Another problem is that if we don't explicitly
flush
at the end,flush
will be called in theatexit
callback on program exit then there is a probability of panic.This might be a bit hard to fix (the reason may be related to signal-safety, see #18 (comment)), but it shouldn't happen and is worth mentioning here and giving it a try.
The text was updated successfully, but these errors were encountered: