From cc40d876890ef8f886c79ed4b7a9700538870772 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 22 May 2024 19:01:43 +0200 Subject: don't log requests to /health --- internal/server/logging.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal') 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", -- cgit 1.4.1