On Tue, Feb 04, 2014 at 11:44:47PM +0100, Willy Tarreau wrote: > Hi Ryan, > > On Tue, Feb 04, 2014 at 04:00:14PM -0600, Ryan O'Hara wrote: > > On Tue, Feb 04, 2014 at 02:05:24PM -0600, Kuldip Madnani wrote: > > > Hi, > > > > > > I want to redirect the logs generated by HAProxy into some specific file > > > .I > > > read that in the global section in log option i can put a file location > > > instead of IP address.I tried using that setting but it dint work for me, > > > also i enabled tcp logging in my listener but no luck.Could any body tell > > > if i am missing something.Here is my configuration: > > > global > > > ........ > > > log /opt/app/workload/haproxy/log/haproxy.log syslog info > > > ........ > > > > On my systems (which use rsyslog) I do this: > > > > log /dev/log local0 > > > > Then I create /etc/rsyslog.d/haproxy.conf, which contains: > > > > local0.* /var/log/haproxy > > > > And everything gets logged there. > > Just a minor point here, when you're dealing with a proxy which is used > in contexts of high load (thousands to tens of thousands of requests per > second), the unix socket's log buffers are too small on many systems, and > many log messages are dropped. Thus on these systems, logging over UDP is > preferred (which requires to setup the syslog server to listen to UDP, > and preferrably only on localhost).
Good to know. I definitely don't generate enough log traffic in my test/development environment to hit this, but I definitely see why UDP would be preferred. Thanks for the tip. Ryan > Best regards, > Willy >