From d176ed2ce683c920a181c908499957c007e4cbc7 Mon Sep 17 00:00:00 2001 From: "mojo-machine[bot]" <111131124+mojo-machine[bot]@users.noreply.github.com> Date: Thu, 30 Nov 2023 10:45:18 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20Sync=20from=20monorepo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/wearemojo/mojo/commit/3919e9868d6da546cdc97c18fc30086fd347f803 --- lib/middleware/request/logger.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)