Improve logging #64

Merged
Jef Roosens merged 5 commits from better-logs into dev 2022-02-02 13:41:18 +01:00
Showing only changes of commit 3ad960fd59 - Show all commits

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