MEDIUM: http: add support for action "set-log-level" in http-request/http-response
Some users want to disable logging for certain non-important requests such as
stats requests or health-checks coming from another equipment. Other users want
to log with a higher importance (eg: notice) some special traffic (POST requests,
authenticated requests, requests coming from suspicious IPs) or some abnormally
large responses.
This patch responds to all these needs at once by adding a "set-log-level" action
to http-request/http-response. The 8 syslog levels are supported, as well as "silent"
to disable logging.
diff --git a/src/session.c b/src/session.c
index 7309af0..5e0da25 100644
--- a/src/session.c
+++ b/src/session.c
@@ -97,6 +97,7 @@
*/
s->flags = 0;
s->logs.logwait = p->to_log;
+ s->logs.level = 0;
memset(s->stkctr, 0, sizeof(s->stkctr));