I have a current generation Linux system I'd like to use with haproxy. Journald will happily log stdout from .service
, and mark the log as coming from that service, but haproxy doesn't seem to be able to log to stdout.
What's the simplest and cleanest way to get haproxy to log to systemd/journald?
Edit: current configuration is the default:
global
log 127.0.0.1 local2
But there's no local2
facility since there's no syslog on the local box.
Systemd has a Unix domain socket you can log to:
Then
systemctl restart haproxy
to make the changes take effect.This answer goes for those struggling. haproxy_global.cfg =>
/etc/rsyslog.d/haproxy.conf =>
/etc/logrotate.d/haproxy =>