rs / zerolog

Zero Allocation JSON Logger
MIT License
10.4k stars 567 forks source link

Fix docs for context.Timestamp #554

Closed counterposition closed 1 year ago

counterposition commented 1 year ago

Contrary to the documentation for zerolog.Context.Timestamp, the following does not log timestamps in Unix format by default:

log := zerolog.New(os.Stderr).With().Timestamp().Logger()
logger.Info().Msg("hello, world")
// output: {"level":"info","time":"2023-06-09T22:43:30-04:00","message":"hello world"}