This commit is contained in:
白茶清欢 2024-07-24 23:05:55 +08:00
parent f2852c8634
commit d6b517ea7a

View File

@ -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"),