Set the log to other path different than /dev/log like for example /dev/halog and use rsyslog, for example, to listen there and write the content to /var/log/haproxy.log
In haproxy.conf, configure the path where the logs are sent. In global section we have (be careful as it may be a chrooted path):
global
log /log local2
chroot /var/lib/haproxy
After we use rsyslog. You have to create the log file as socket file, then configure rsyslog as usual to send the logs where you want :
# 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/log
$template message_only,"%msg%\n"
# Send HAProxy messages to a dedicated logfile
if $programname startswith 'haproxy' then /var/log/haproxy.log;message_only
#& -?haproxy_by_minute;message_only
& stop
Restart rsyslog then restart haproxy and you should be able to get your logs in the right file