在haproxy.cfg的global里添加日志配置:
log 127.0.0.1 local3
然后
vi /etc/syslog.conf
添加 local3.* /var/log/haproxy.log
vi /etc/sysconfig/syslog
把SYSLOGD_OPTIONS="-m 0"
改成 SYSLOGD_OPTIONS="-r -m 0" #enables logging from remote machines
重启syslogd: /etc/init.d/syslog restart
tail -f -n 30 /var/log/haproxy.log 应该可以看到日志输出了。