Re: HAProxy 1.5-dev18 logs messages twice
Dinko Korunic wrote: > On 18.06.2013 17:36, Chris Fryer wrote: > [...] > >> I notice that each request is logged once, then logged again immediately >> before the next request is logged. If there is no "next" request, the >> request is logged a second time after a pause of between 60 and 70 seconds. >> >> If I comment out the "log global" line from the frontend configuration, >> only one request is logged. >> >> This did not used to happen with HAProxy 1.4 > > Hi, > > This is due to 1.5 supporting several log targets, so in your > configuration that's effectively having same log target twice. I've > reported this and the explanation was that it's known and intended behavior. Thanks. Needless to say, this is not apparent from the documentation, so perhaps that should be updated to reflect this state of affairs. Regards, Chris Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer
Re: HAProxy 1.5-dev18 logs messages twice
On 18.06.2013 17:36, Chris Fryer wrote: [...] > I notice that each request is logged once, then logged again immediately > before the next request is logged. If there is no "next" request, the > request is logged a second time after a pause of between 60 and 70 seconds. > > If I comment out the "log global" line from the frontend configuration, > only one request is logged. > > This did not used to happen with HAProxy 1.4 Hi, This is due to 1.5 supporting several log targets, so in your configuration that's effectively having same log target twice. I've reported this and the explanation was that it's known and intended behavior. Kind regards, D. -- Dinko Korunic PGP:0xEA160D0B R&D Department Manager at Reflected
HAProxy 1.5-dev18 logs messages twice
Hello HAProxy 1.5-dev18 seems to log the same message twice when "log global" is specified in the "defaults" section, and again in a frontend section. Here are the relevant extracts from our haproxy.cfg: global log 127.0.0.1 local4 log 127.0.0.1 local5 notice [ ... ] defaults logglobal mode http option httplog option dontlognull [ ... ] frontend http 0.0.0.0:80 log global maxconn 25000 option forwardfor except 127.0.0.1 option httpclose capture request header X-Forwarded-For len 40 [ ... ] frontend https bind 0.0.0.0:443 ssl crt /etc/haproxy/ \ no-sslv3 ciphers HIGH:RC4:!aNULL:!MD5 log global maxconn 25000 option forwardfor except 127.0.0.1 option httpclose capture request header X-Forwarded-For len 40 and here is the extract from rsyslog.conf: $template DailyHaproxyDetailLog,"/var/log/haproxy/haproxy-detail-%$year%-%$month%-%$day%.log" if $syslogfacility-text == 'local4' and $programname == 'haproxy' then -?DailyHaproxyDetailLog & ~ if $syslogfacility-text == 'local5' and $programname == 'haproxy' then -/var/log/haproxy/haproxy-info.log & ~ I notice that each request is logged once, then logged again immediately before the next request is logged. If there is no "next" request, the request is logged a second time after a pause of between 60 and 70 seconds. If I comment out the "log global" line from the frontend configuration, only one request is logged. This did not used to happen with HAProxy 1.4 Is this a bug? Chris Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer