-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Custom timestamp field #485
Copy link
Copy link
Closed
Description
I'm trying to customise the time stamp field as mentioned in the last comment of this thread.
logger := zap.New(
zap.NewJSONEncoder(zap.RFC3339Formatter("@timestamp")),
zap.ErrorLevel,
zap.Output(someFile),
)
But it seems the content is outdated already. I couldn't locate zap.RFC3339Formatter and zap.NewJSONEncoder is moved to zapcore.NewJSONEncoder. An example usage with the new API changes would be a great thing to have.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels