all repos — website @ cc40d876890ef8f886c79ed4b7a9700538870772

My website

don't log requests to /health

Alan Pearce
commit

cc40d876890ef8f886c79ed4b7a9700538870772

parent

8469992f30544606151e200378afceb880843623

1 file changed, 3 insertions(+), 0 deletions(-)

changed files
M internal/server/logging.gointernal/server/logging.go
@@ -31,6 +31,9 @@ }
host := r.Host lw := NewLoggingResponseWriter(w) wrappedHandler.ServeHTTP(lw, r) + if r.URL.Path == "/health" { + return + } statusCode := lw.statusCode log.Info( "http request",