-
Notifications
You must be signed in to change notification settings - Fork 119
Description
Right now, info-level logging output is not line-buffered by default, whereas error-level logging output is. This is a problem for usability, since it causes extremely confusing logs when an error message in one process is flushed before a much later info message in a simultaneous process. The buffering of stdout, while appropriate for some Linux programs, is inappropriate when diagnostic logging output is emitted from both streams stderr and stdout.
The consequences of having RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED=1 when it should be 0 is a tiny (if noticeable) performance hit. The consequences of having it 0 when it should be 1 is incomprehensibly misordered logging output, often with info messages not emitted until a node dies, and no sequence numbers nor timestamps to indicate this misordering. Because of this, logging should default RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED to 1 if unset.