Open zhujintao opened 2 months ago
suggestion is to use the function in the file event.go
event.go
func (e *Event) Timestamp() *Event { if e == nil { return e } t := TimestampFunc() ctx := context.WithValue(e.GetCtx(), "time", t) e.Ctx(ctx) e.buf = enc.AppendTime(enc.AppendKey(e.buf, TimestampFieldName), t, TimeFieldFormat) return e }
suggestion is to use the function in the file
event.go