添加打印到控制台的方法&添加设置时区

This commit is contained in:
Yun
2024-06-20 23:59:13 +08:00
parent 791a08b77a
commit bcd576e400
3 changed files with 26 additions and 11 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ func (l *Logger) logger(ctx context.Context, event string, v ...any) {
by, _ := json.Marshal(v)
nowTime := time.Now().Local().Format("2006-01-02 15:04:05.000000")
nowTime := time.Now().In(l.option.timeZone).Format("2006-01-02 15:04:05.000000")
traceId, _ := ctx.Value(l.option.traceField).(string)