Skip to content

Commit ee97b2a

Browse files
committed
fix logging middleware
1 parent 5f29eee commit ee97b2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

middlewares/logging.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
// Add the logger into the request context and add some request info into all log records.
1010
func WithLogger(logger *slog.Logger, h josh.Handler) josh.Handler {
1111
return func(req josh.Req) josh.Resp {
12-
logger = logger.With(
12+
logger := logger.With(
1313
"method", req.Method,
1414
"pattern", req.Pattern,
1515
"path", req.URL.Path,

0 commit comments

Comments
 (0)