MCPcopy Create free account
hub / github.com/discourse/discourse-auth-proxy / logHandler

Function logHandler

logging.go:56–62  ·  view source on GitHub ↗
(next http.Handler)

Source from the content-addressed store, hash-verified

54}
55
56func logHandler(next http.Handler) http.Handler {
57 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
58 lw := &loggableResponseWriter{next: w}
59 next.ServeHTTP(lw, r)
60 log.Printf("%s %s %s %d", r.RemoteAddr, r.Method, r.URL, lw.StatusCode)
61 })
62}

Callers 1

mainFunction · 0.85

Calls 1

PrintfMethod · 0.80

Tested by

no test coverage detected