Timestamp adds the current local time to the logger context with the "time" key, formatted using zerolog.TimeFieldFormat. To customize the key name, change zerolog.TimestampFieldName. To customize the time format, change zerolog.TimeFieldFormat. NOTE: It won't dedupe the "time" key if the *Context
()
| 404 | // |
| 405 | // NOTE: It won't dedupe the "time" key if the *Context has one already. |
| 406 | func (c Context) Timestamp() Context { |
| 407 | c.l = c.l.Hook(th) |
| 408 | return c |
| 409 | } |
| 410 | |
| 411 | // Time adds the field key with t formatted as string using zerolog.TimeFieldFormat. |
| 412 | func (c Context) Time(key string, t time.Time) Context { |