update logging middleware

design
serr 2025-06-08 01:03:46 +03:00
parent 8dae9dd8ba
commit 9fe32a1a7a
1 changed files with 7 additions and 1 deletions

View File

@ -35,6 +35,12 @@ func loggingMiddleware(next http.Handler) http.Handler {
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))
})
}