From 3ad960fd5928adfb623698693ddf78c003077adb Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Wed, 2 Feb 2022 13:10:55 +0100 Subject: [PATCH] Filter healthcheck out of logs --- src/web/web.v | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/web/web.v b/src/web/web.v index bbb909f..9621a2d 100644 --- a/src/web/web.v +++ b/src/web/web.v @@ -511,9 +511,12 @@ fn handle_conn(mut conn net.TcpConn, mut app T, routes map[string]Route) { return } - lock app.logger { - app.logger.debug('$head.method $head.url $head.version') - } + // The healthcheck spams the logs, which isn't very useful + if head.url != '/health' { + lock app.logger { + app.logger.debug('$head.method $head.url $head.version') + } + } // req := http.parse_request(mut reader) or { // // Prevents errors from being thrown when BufferedReader is empty