Add method to request log
This commit is contained in:
parent
717cf333f7
commit
e72b2d0f95
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user