Timestamp returns a timestamp Valuer. It invokes the t function to get the time; unless you are doing something tricky, pass time.Now. Most users will want to use DefaultTimestamp or DefaultTimestampUTC, which are TimestampFormats that use the RFC3339Nano format.
(t func() time.Time)
| 17 | // Most users will want to use DefaultTimestamp or DefaultTimestampUTC, which |
| 18 | // are TimestampFormats that use the RFC3339Nano format. |
| 19 | func Timestamp(t func() time.Time) Valuer { |
| 20 | return log.Timestamp(t) |
| 21 | } |
| 22 | |
| 23 | // TimestampFormat returns a timestamp Valuer with a custom time format. It |
| 24 | // invokes the t function to get the time to format; unless you are doing |
no outgoing calls
searching dependent graphs…