mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
BUG/MINOR: log: don't report logformat errors in backends
Logs have always been ignored by backends, do not report useless warnings there.
This commit is contained in:
parent
196729eff8
commit
99a7ca2fa6
@ -1539,6 +1539,14 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
||||
curproxy->monitor_uri_len = defproxy.monitor_uri_len;
|
||||
if (defproxy.defbe.name)
|
||||
curproxy->defbe.name = strdup(defproxy.defbe.name);
|
||||
|
||||
/* get either a pointer to the logformat string or a copy of it */
|
||||
curproxy->logformat_string = defproxy.logformat_string;
|
||||
if (curproxy->logformat_string &&
|
||||
curproxy->logformat_string != default_http_log_format &&
|
||||
curproxy->logformat_string != default_tcp_log_format &&
|
||||
curproxy->logformat_string != clf_http_log_format)
|
||||
curproxy->logformat_string = strdup(curproxy->logformat_string);
|
||||
}
|
||||
|
||||
if (curproxy->cap & PR_CAP_BE) {
|
||||
@ -1563,14 +1571,6 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
||||
LIST_ADDQ(&curproxy->logsrvs, &node->list);
|
||||
}
|
||||
|
||||
/* get either a pointer to the logformat string or a copy of it */
|
||||
curproxy->logformat_string = defproxy.logformat_string;
|
||||
if (curproxy->logformat_string &&
|
||||
curproxy->logformat_string != default_http_log_format &&
|
||||
curproxy->logformat_string != default_tcp_log_format &&
|
||||
curproxy->logformat_string != clf_http_log_format)
|
||||
curproxy->logformat_string = strdup(curproxy->logformat_string);
|
||||
|
||||
curproxy->uniqueid_format_string = defproxy.uniqueid_format_string;
|
||||
if (curproxy->uniqueid_format_string)
|
||||
curproxy->uniqueid_format_string = strdup(curproxy->uniqueid_format_string);
|
||||
@ -6223,6 +6223,14 @@ out_uri_auth_compat:
|
||||
}
|
||||
|
||||
/* compile the log format */
|
||||
if (!(curproxy->cap & PR_CAP_FE)) {
|
||||
if (curproxy->logformat_string != default_http_log_format &&
|
||||
curproxy->logformat_string != default_tcp_log_format &&
|
||||
curproxy->logformat_string != clf_http_log_format)
|
||||
free(curproxy->logformat_string);
|
||||
curproxy->logformat_string = NULL;
|
||||
}
|
||||
|
||||
if (curproxy->logformat_string)
|
||||
parse_logformat_string(curproxy->logformat_string, curproxy, &curproxy->logformat, curproxy->mode);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user