From e72b2d0f9598cc9dcfffbd0560c8e1a2f2d0d4ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sun, 22 Oct 2023 23:12:12 +0200 Subject: [PATCH] Add method to request log --- server/middleware.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/middleware.go b/server/middleware.go index 4803618..ba704cb 100644 --- a/server/middleware.go +++ b/server/middleware.go @@ -15,6 +15,7 @@ func (s *UserServer) MiddlewareLogging(next http.Handler) http.Handler { defer func(ww middleware.WrapResponseWriter) { s.Logger.Info("Served request.", "status", ww.Status(), + "method", r.Method, "path", r.URL.Path, "duration", time.Since(t1), "written", ww.BytesWritten())