update logging middleware
parent
8dae9dd8ba
commit
9fe32a1a7a
|
@ -35,6 +35,12 @@ func loggingMiddleware(next http.Handler) http.Handler {
|
||||||
|
|
||||||
next.ServeHTTP(w, r)
|
next.ServeHTTP(w, r)
|
||||||
|
|
||||||
log.Printf("%s %s %v", r.Method, r.URL.Path, time.Since(start))
|
fullURL := r.URL.String()
|
||||||
|
|
||||||
|
log.Printf("%s %s | client: %s | duration: %v",
|
||||||
|
r.Method,
|
||||||
|
fullURL,
|
||||||
|
r.RemoteAddr,
|
||||||
|
time.Since(start))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue