all repos — homestead @ 0b020b0b0accd38af5129279c1b5614eb04e912d

Code for my website

don't log requests to /health

Alan Pearce
commit

0b020b0b0accd38af5129279c1b5614eb04e912d

parent

fc2bbbb206110d51ef79c3855ff4e1c7185144d0

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

jump to
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",