Skip to content

INFO and ERROR logging should come out in order by default #168

@rotu

Description

@rotu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions