From d6b517ea7a35b86c5d038605dbd0eb75c181f640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Wed, 24 Jul 2024 23:05:55 +0800 Subject: [PATCH] log env --- util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/util.go b/util.go index 918a864..b88b30b 100644 --- a/util.go +++ b/util.go @@ -42,6 +42,7 @@ func getStrVal(ctx context.Context, key string) string { func NewLogData(ctx context.Context, logType string, code string, logData map[string]any) *LogData { hostname, _ := os.Hostname() commonLogData := &LogData{ + Env: getStrVal(ctx, "env"), Uri: getStrVal(ctx, "uri"), TraceID: getStrVal(ctx, "trace_id"), UserID: getStrVal(ctx, "user_id"),