1
0
mirror of https://github.com/rs/zerolog synced 2026-06-08 17:13:30 +00:00

docs: context.Timestamp uses zerolog.TimeFieldFormat (#554)

This commit is contained in:
Harish Kukreja
2023-06-11 11:20:21 -04:00
committed by GitHub
parent 4612e098d2
commit b662f088b9
+2 -1
View File
@@ -329,8 +329,9 @@ func (ts timestampHook) Run(e *Event, level Level, msg string) {
var th = timestampHook{}
// Timestamp adds the current local time as UNIX timestamp to the logger context with the "time" key.
// 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 has one already.
func (c Context) Timestamp() Context {