diff options
author | Alan Pearce | 2024-05-22 19:01:43 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-23 05:16:24 +0200 |
commit | cc40d876890ef8f886c79ed4b7a9700538870772 (patch) | |
tree | f2d07a697120bd4cb84359f60ee2991f822a4eb6 /internal/server | |
parent | 8469992f30544606151e200378afceb880843623 (diff) | |
download | website-cc40d876890ef8f886c79ed4b7a9700538870772.tar.lz website-cc40d876890ef8f886c79ed4b7a9700538870772.tar.zst website-cc40d876890ef8f886c79ed4b7a9700538870772.zip |
don't log requests to /health
Diffstat (limited to 'internal/server')
-rw-r--r-- | internal/server/logging.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/server/logging.go b/internal/server/logging.go index d70d927..a574bcb 100644 --- a/internal/server/logging.go +++ b/internal/server/logging.go @@ -31,6 +31,9 @@ func wrapHandlerWithLogging(wrappedHandler http.Handler) http.Handler { host := r.Host lw := NewLoggingResponseWriter(w) wrappedHandler.ServeHTTP(lw, r) + if r.URL.Path == "/health" { + return + } statusCode := lw.statusCode log.Info( "http request", |