Time adds the field key with t formatted as string using zerolog.TimeFieldFormat.
(key string, t time.Time)
| 763 | |
| 764 | // Time adds the field key with t formatted as string using zerolog.TimeFieldFormat. |
| 765 | func (e *Event) Time(key string, t time.Time) *Event { |
| 766 | if e == nil { |
| 767 | return e |
| 768 | } |
| 769 | e.buf = enc.AppendTime(enc.AppendKey(e.buf, key), t, TimeFieldFormat) |
| 770 | return e |
| 771 | } |
| 772 | |
| 773 | // Times adds the field key with t formatted as string using zerolog.TimeFieldFormat. |
| 774 | func (e *Event) Times(key string, t []time.Time) *Event { |