1. 修改"/etc/haproxy/haproxy.cfg"
log 127.0.0.1 local2
2. vim /etc/sysconfig/rsyslog
SYSLOGD_OPTIONS="-r -m 0 -c 2"
3. /etc/rsyslog.conf
$ModLoad imudp
$UDPServerRun 514
local2.* /var/log/haproxy.log
4. service rsyslog restart
5. service haproxy restart
本文出自 “小V运维之路” 博客,请务必保留此出处http://victor2016.blog.51cto.com/6768693/1895165
原文地址:http://victor2016.blog.51cto.com/6768693/1895165