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 debugged an issue today concerning log messages appearing 15 minutes in the log after the message was actually emitted. I traced it back to GHC using block-buffering for stdout, if the FD is not associated with a TTY, which is the case for my service since it is managed by systemd. Now I wonder: Does the provided StandardOutput logger ever flush, because after looking at the code I don't think so.
Is this considered out of scope and applications are expected to set the correct buffering on stdout themselves (or call hFlush in the logging action)?
The text was updated successfully, but these errors were encountered:
Given that we provide our own BulkStdoutLogger, I think we should make stdout loggers flush on each write (bulk write in the case of the bulk logger), plus make them flush on exit. I'll write a patch.
I'm using a custom logger that is based on (withSimple)stdoutLogger:
log/log-base/src/Log/Backend/StandardOutput.hs
Line 36 in f93584d
I debugged an issue today concerning log messages appearing 15 minutes in the log after the message was actually emitted. I traced it back to GHC using block-buffering for stdout, if the FD is not associated with a TTY, which is the case for my service since it is managed by systemd. Now I wonder: Does the provided StandardOutput logger ever flush, because after looking at the code I don't think so.
Is this considered out of scope and applications are expected to set the correct buffering on stdout themselves (or call hFlush in the logging action)?
The text was updated successfully, but these errors were encountered: