File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ type Options struct {
168
168
// underlying Zap logger.
169
169
ZapOpts []zap.Option
170
170
// TimeEncoder specifies the encoder for the timestamps in log messages.
171
- // Defaults to EpochTimeEncoder as this is the default in Zap currently .
171
+ // Defaults to RFC3339TimeEncoder .
172
172
TimeEncoder zapcore.TimeEncoder
173
173
}
174
174
@@ -217,7 +217,7 @@ func (o *Options) addDefaults() {
217
217
}
218
218
219
219
if o .TimeEncoder == nil {
220
- o .TimeEncoder = zapcore .EpochTimeEncoder
220
+ o .TimeEncoder = zapcore .RFC3339TimeEncoder
221
221
}
222
222
f := func (ecfg * zapcore.EncoderConfig ) {
223
223
ecfg .EncodeTime = o .TimeEncoder
Original file line number Diff line number Diff line change @@ -502,7 +502,7 @@ var _ = Describe("Zap log level flag options setup", func() {
502
502
Expect (optVal .Pointer ()).To (Equal (expVal .Pointer ()))
503
503
})
504
504
505
- It ("Should default to 'epoch ' time encoding" , func () {
505
+ It ("Should default to 'rfc3339 ' time encoding" , func () {
506
506
args := []string {"" }
507
507
fromFlags .BindFlags (& fs )
508
508
err := fs .Parse (args )
@@ -513,7 +513,7 @@ var _ = Describe("Zap log level flag options setup", func() {
513
513
opt .addDefaults ()
514
514
515
515
optVal := reflect .ValueOf (opt .TimeEncoder )
516
- expVal := reflect .ValueOf (zapcore .EpochTimeEncoder )
516
+ expVal := reflect .ValueOf (zapcore .RFC3339TimeEncoder )
517
517
518
518
Expect (optVal .Pointer ()).To (Equal (expVal .Pointer ()))
519
519
})
You can’t perform that action at this time.
0 commit comments