From 2455c1170458c8f49e20c407f4ee21e25bd8a7d2 Mon Sep 17 00:00:00 2001 From: Neur0toxine Date: Tue, 24 Oct 2023 14:15:28 +0300 Subject: [PATCH] move gin to handler field --- core/logger/gin.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/logger/gin.go b/core/logger/gin.go index 21eb8ec..0443468 100644 --- a/core/logger/gin.go +++ b/core/logger/gin.go @@ -22,7 +22,8 @@ func GinMiddleware(log Logger) gin.HandlerFunc { path = path + "?" + raw } - log.Info("[GIN] request", + log.Info("request", + slog.String(HandlerAttr, "GIN"), slog.String("startTime", start.Format(time.RFC3339)), slog.String("endTime", end.Format(time.RFC3339)), slog.Any("latency", end.Sub(start)/time.Millisecond),