aboutsummaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-02-22 08:53:14 +0000
committerOmar Polo <op@omarpolo.com>2021-02-23 13:43:24 +0100
commit793835cb26c39202133c754fb33f8909ebf8fb92 (patch)
tree4e9bdaa9a6d1d035e6c3bb004ba504a8271db0fd /log.c
parentfd9a4869253110c96e94b4705d4c3604f4d28ce7 (diff)
add `log on/off' to enable/disable logs per-location
Diffstat (limited to 'log.c')
-rw-r--r--log.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/log.c b/log.c
index 6bb84f1..b47444b 100644
--- a/log.c
+++ b/log.c
@@ -188,6 +188,9 @@ log_request(struct client *c, char *meta, size_t l)
size_t len;
int ec;
+ if (vhost_disable_log(c->host, c->iri.path))
+ return;
+
len = sizeof(c->addr);
ec = getnameinfo((struct sockaddr*)&c->addr, len,
hbuf, sizeof(hbuf),