mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-16 08:24:42 +00:00
MINOR: log: allow the HTTP status code to be logged even in TCP frontends
Log format is defined in the frontend, and some frontends may be chained to an HTTP backend. Sometimes it's very convenient to be able to log the HTTP status code of these HTTP backends. This status is definitely present in the internal structures, it's just that we used to limit it to be used in HTTP frontends. So let's simply relax the check to allow it to be used in TCP frontends as well.
This commit is contained in:
parent
be722a2d64
commit
4bf9963a78
@ -12076,7 +12076,7 @@ Please refer to the table below for currently defined variables :
|
||||
| H | %CS | captured_response_cookie | string |
|
||||
| | %H | hostname | string |
|
||||
| | %ID | unique-id | string |
|
||||
| H | %ST | status_code | numeric |
|
||||
| | %ST | status_code | numeric |
|
||||
| | %T | gmt_date_time | date |
|
||||
| | %Tc | Tc | numeric |
|
||||
| | %Tl | local_date_time | date |
|
||||
|
@ -80,7 +80,7 @@ static const struct logformat_type logformat_keywords[] = {
|
||||
{ "CS", LOG_FMT_CSERVER, PR_MODE_HTTP, LW_RSPHDR, NULL }, /* server cookie */
|
||||
{ "H", LOG_FMT_HOSTNAME, PR_MODE_TCP, LW_INIT, NULL }, /* Hostname */
|
||||
{ "ID", LOG_FMT_UNIQUEID, PR_MODE_HTTP, LW_BYTES, NULL }, /* Unique ID */
|
||||
{ "ST", LOG_FMT_STATUS, PR_MODE_HTTP, LW_RESP, NULL }, /* status code */
|
||||
{ "ST", LOG_FMT_STATUS, PR_MODE_TCP, LW_RESP, NULL }, /* status code */
|
||||
{ "T", LOG_FMT_DATEGMT, PR_MODE_TCP, LW_INIT, NULL }, /* date GMT */
|
||||
{ "Tc", LOG_FMT_TC, PR_MODE_TCP, LW_BYTES, NULL }, /* Tc */
|
||||
{ "Tl", LOG_FMT_DATELOCAL, PR_MODE_TCP, LW_INIT, NULL }, /* date local timezone */
|
||||
|
Loading…
Reference in New Issue
Block a user