]>
git.ipfire.org Git - thirdparty/util-linux.git/commit
logger: reconnect on failed send()
The libc syslog() reconnects on failed send(). We need the same thing
as logger(1) is expected as long time running tool. For example
recommended Apache configuration is:
ErrorLog "| /usr/bin/logger -t apache_error -p local6.debug"
The issue is that connection endpoint (e.g. syslogd) maybe restarted.
The simple way how to test is:
for i in $(seq 0 3600); do echo "This is message number $i"; sleep 1; done | logger --tcp --server 127.0.0.1 --port 514
and restart your syslog. The current implementation gets SIGPIPE or
write warning message, but it never reconnect.
Addresses: https://github.com/karelzak/util-linux/issues/363
Signed-off-by: Karel Zak <kzak@redhat.com>