Hi Thayne,
Le 02/11/2017 à 23:08, Thayne McCombs a écrit :
So, I looked into using `no log` in non http frontends. But that isn't
sufficient.
For example, if I have:
global
log-tag "test"
log localhost:514 len 65535 local2 info info
defaults
mode http
timeout connect 100
timeout server 30000
timeout client 30000
log-format "%Tq"
listen mine
log global
bind :80
server localhost localhost:8080
listen health_url
bind :27000
mode health
option httpchk
no log
I still get [ALERT] 305/160229 (21975) : Parsing [test.cfg:10]: failed
to parse log-format : format variable 'Tq' is reserved for HTTP mode.
You can specify several "defaults" sections in your configuration : one
for http, and one for tcp frontends.
global
log-tag "test"
log localhost:514 len 65535 local2 info info
defaults
mode http
timeout connect 100
timeout server 30000
timeout client 30000
log-format "%Tq"
listen mine
log global
bind :8080
server localhost localhost:80
# ...
# Other HTTP frontends
# ...
defaults
mode tcp
timeout connect 100
timeout server 30000
timeout client 30000
listen health_url
bind :27000
mode health
option httpchk
# ...
# Other TCP frontends
# ...
However, if I add `log-format "GARBAGE"` to the health_url listener,
then the error goes away.
Or you can specify "option tcplog" in your "health_url" section (or any
other tcp sections).
--
Cyril Bonté