Loads simpler to do the following:

## /etc/haproxy/haproxy.cfg

global
  log /dev/log local0 notice

## /etc/rsyslog.d/49-haproxy.conf

# Create an additional socket in haproxy's chroot in order
# to allow logging via /dev/log to chroot'ed HAProxy processes
$AddUnixListenSocket /var/lib/haproxy/dev/log

# Send HAProxy messages to a dedicated logfile
if $programname startswith 'haproxy' then /var/log/haproxy.log
&~

I believe most of the above is included in Vincent Bernat's very nice Ubuntu/Debian packages, https://launchpad.net/~vbernat

Ramin


Reply via email to