mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-20 00:10:41 -05:00
DOC: add encoding to json converter example
Without the encoding `log-format` will issue a warning like: $ haproxy -c -f /etc/haproxy/haproxy.cfg [WARNING] 073/180933 (179) : parsing [/etc/haproxy/haproxy.cfg:46] : 'log-format' : sample fetch <capture.req.hdr(1),json> failed with : missing args for conv method 'json'
This commit is contained in:
parent
840b0240bc
commit
e83345df1b
1 changed files with 1 additions and 1 deletions
|
|
@ -11784,7 +11784,7 @@ json([<input-code>])
|
|||
Example:
|
||||
capture request header user-agent len 150
|
||||
capture request header Host len 15
|
||||
log-format {"ip":"%[src]","user-agent":"%[capture.req.hdr(1),json]"}
|
||||
log-format {"ip":"%[src]","user-agent":"%[capture.req.hdr(1),json("utf8s")]"}
|
||||
|
||||
Input request from client 127.0.0.1:
|
||||
GET / HTTP/1.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue