前端“http-in”忽略日志格式,因为它没有日志地址

Chr*_*now 7 haproxy

我正在使用来自 couchdb 项目的以下haproxy.cfg

global
        maxconn 512
        spread-checks 5

defaults
        mode http
        log global
        monitor-uri /_haproxy_health_check
        option log-health-checks
        option httplog
        balance roundrobin
        option forwardfor
        option redispatch
        retries 4
        option http-server-close
        timeout client 150000
        timeout server 3600000
        timeout connect 500

        stats enable
        stats scope .
        stats uri /_stats

frontend http-in
         # This requires HAProxy 1.5.x
         # bind *:$HAPROXY_PORT
         bind *:5984
         default_backend couchdbs

backend couchdbs
        server couchdb1 127.0.0.1:15984 check inter 5s
        server couchdb2 127.0.0.1:25984 check inter 5s
        server couchdb3 127.0.0.1:35984 check inter 5s
Run Code Online (Sandbox Code Playgroud)

但是,我在 haproxy.log 文件中看到以下内容:

[WARNING] 244/190008 (3040) : config : log format ignored for frontend
            'http-in' since it has no log address.
Run Code Online (Sandbox Code Playgroud)

这个警告实际上是什么意思?


我的haproxy版本是:

# haproxy --version
HA-Proxy version 1.5.8 2014/10/31
Run Code Online (Sandbox Code Playgroud)

mda*_*iel 10

这是令人不安的,因为配置文件说要使用“[global] 中指定的日志”(这是log global语句),但该global部分不包含任何日志规范。

要解决此问题,log 127.0.0.1 local0请按照此处所述放置(或您最喜欢的系统日志服务器和工具)