diff --git a/lib/middleware/request/logger.go b/lib/middleware/request/logger.go index fbbcd91..aa9f377 100644 --- a/lib/middleware/request/logger.go +++ b/lib/middleware/request/logger.go @@ -60,7 +60,8 @@ func Logger(log *logrus.Entry) func(http.Handler) http.Handler { // create a mutable logger instance which will persist for the request // inject pointer to the logger into the request context - r = r.WithContext(clog.Set(ctx, log)) + ctx = clog.Set(ctx, log) + r = r.WithContext(ctx) // panics inside handlers will be logged to standard before propagation defer clog.HandlePanic(ctx, true)