diff --git a/mvc/controllers/middlewares.go b/mvc/controllers/middlewares.go index d57c130..8516d9f 100644 --- a/mvc/controllers/middlewares.go +++ b/mvc/controllers/middlewares.go @@ -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)) }) }