Config file for haproxy logs

Currently I have my haproxy traffic logs going into gray log but my system logs for that server are not.
here is my .conf file. Where have a I gone wrong? If i move the system log line to the top then that works but haproxy traffic logs stop then and vice vera.

$AddUnixListenSocket /var/lib/haproxy/dev/log

Send HAProxy messages to a dedicated logfile
if $programname startswith ‘haproxy’ then /var/log/haproxy.log
if $syslogtag contains ‘haproxy’ then @@;GRAYLOGRFC5424

. @@;RSYSLOG_SyslogProtocol23Format

I think i worked that out by having 2 config files one for syslog and other for the haproxy part then it seems to log both.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.