move gin to handler field

This commit is contained in:
Pavel 2023-10-24 14:15:28 +03:00
parent 7d1f722a9e
commit 2455c11704

View File

@ -22,7 +22,8 @@ func GinMiddleware(log Logger) gin.HandlerFunc {
path = path + "?" + raw path = path + "?" + raw
} }
log.Info("[GIN] request", log.Info("request",
slog.String(HandlerAttr, "GIN"),
slog.String("startTime", start.Format(time.RFC3339)), slog.String("startTime", start.Format(time.RFC3339)),
slog.String("endTime", end.Format(time.RFC3339)), slog.String("endTime", end.Format(time.RFC3339)),
slog.Any("latency", end.Sub(start)/time.Millisecond), slog.Any("latency", end.Sub(start)/time.Millisecond),