TT#183265 Autoflush all log messages

This prevents log messages from being buffered if
output goes to a pipe (i.e. consumed by journald).

Without autoflush, STDOUT logs are buffered due to
journald which is buffering Perl STDOUT by default.
In the same time STDERR logs are flushed immediately
by Perl which is confusing as log lines are mixed.

Change-Id: I5a2d07285a99c5628ae69b87014d9919433f816d
mr11.0
Richard Fuchs 3 years ago committed by Alexander Lutay
parent 05b17ad988
commit 7e8e5cb9a4

@ -3578,6 +3578,11 @@ sub main {
my $pidfh;
# Without autoflush logs are buffered due to
# journald which is buffering Perl STDOUT
# (STDERR flushed immediately which confusing)
select->autoflush(1);
INFO "Starting rate-o-mat.\n";
if ($fork != 0) {

Loading…
Cancel
Save