Filter healthcheck out of logs

main
Jef Roosens 2022-02-02 13:10:55 +01:00
parent eb91e73510
commit 3ad960fd59
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
1 changed files with 6 additions and 3 deletions

View File

@ -511,9 +511,12 @@ fn handle_conn<T>(mut conn net.TcpConn, mut app T, routes map[string]Route) {
return return
} }
// The healthcheck spams the logs, which isn't very useful
if head.url != '/health' {
lock app.logger { lock app.logger {
app.logger.debug('$head.method $head.url $head.version') app.logger.debug('$head.method $head.url $head.version')
} }
}
// req := http.parse_request(mut reader) or { // req := http.parse_request(mut reader) or {
// // Prevents errors from being thrown when BufferedReader is empty // // Prevents errors from being thrown when BufferedReader is empty