From 7f954691634a794019e5f8720b8edb95f9f90258 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Sun, 14 May 2023 23:23:36 +0200 Subject: [PATCH] MEDIUM: proxy: stop emitting logs for internal proxies when stopping The HTTPCLIENT and the OCSP-UPDATE proxies are internal proxies, we don't need to display logs of them stopping during the stopping of the process. This patch checks if a proxy has the flag PR_CAP_INT so it doesn't display annoying messages. --- src/proxy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proxy.c b/src/proxy.c index d2f109366..b932c0c2b 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -1989,11 +1989,11 @@ void proxy_cond_disable(struct proxy *p) * peers, etc) we must not report them at all as they're not really on * the data plane but on the control plane. */ - if (p->mode == PR_MODE_TCP || p->mode == PR_MODE_HTTP || p->mode == PR_MODE_SYSLOG) + if ((p->mode == PR_MODE_TCP || p->mode == PR_MODE_HTTP || p->mode == PR_MODE_SYSLOG) && !(p->cap & PR_CAP_INT)) ha_warning("Proxy %s stopped (cumulated conns: FE: %lld, BE: %lld).\n", p->id, p->fe_counters.cum_conn, p->be_counters.cum_conn); - if (p->mode == PR_MODE_TCP || p->mode == PR_MODE_HTTP) + if ((p->mode == PR_MODE_TCP || p->mode == PR_MODE_HTTP) && !(p->cap & PR_CAP_INT)) send_log(p, LOG_WARNING, "Proxy %s stopped (cumulated conns: FE: %lld, BE: %lld).\n", p->id, p->fe_counters.cum_conn, p->be_counters.cum_conn);