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
                log        global
                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/<certfile> \
                                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

Reply via email to