Compare commits

..

2 Commits

Author SHA1 Message Date
ba2f3876c6 Run go mod tidy 2023-10-22 23:12:29 +02:00
e72b2d0f95 Add method to request log 2023-10-22 23:12:12 +02:00
2 changed files with 2 additions and 1 deletions

2
go.mod
View File

@ -3,6 +3,7 @@ module git.t-juice.club/microfilm/users
go 1.21.3
require (
git.t-juice.club/microfilm/auth v0.1.1
github.com/go-chi/chi/v5 v5.0.10
github.com/google/uuid v1.3.1
github.com/nats-io/nats.go v1.31.0
@ -11,7 +12,6 @@ require (
)
require (
git.t-juice.club/microfilm/auth v0.1.1 // indirect
github.com/golang-jwt/jwt/v5 v5.0.0 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/nats-io/nkeys v0.4.5 // indirect

View File

@ -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())