From: Damyan Ivanov Date: Fri, 26 Nov 2021 12:00:16 +0000 (+0000) Subject: set autoflush on stderr so that logging to systemd's journal (via UNIX socket) is... X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=7bcfd7b37974fc1ce0fa6020117a6320f8451bfc;p=mpd-feeder.git set autoflush on stderr so that logging to systemd's journal (via UNIX socket) is more real-time --- diff --git a/bin/mpd-feeder b/bin/mpd-feeder index ffb7994..29a6d5b 100755 --- a/bin/mpd-feeder +++ b/bin/mpd-feeder @@ -8,6 +8,12 @@ use App::MPD::Feeder; use Log::Any qw($log); use Log::Any::Adapter Stderr => log_level => 'error'; +{ # autoflush without IO::Handle + my $fh = select STDERR; + $| = 1; + select $fh; +} + my $feeder = App::MPD::Feeder->new(); if (@ARGV) {