Skip to content

Does withSimpleStdOutLogger ever flush? #38

@linearray

Description

@linearray

I'm using a custom logger that is based on (withSimple)stdoutLogger:

stdoutLogger :: IO Logger

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)?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions