采用新版内置常量
This commit is contained in:
parent
4492af7622
commit
4d1bd7e84c
|
@ -31,7 +31,7 @@ func newLogger() *zap.Logger {
|
|||
EncodeLevel: zapcore.CapitalLevelEncoder,
|
||||
TimeKey: "ts",
|
||||
EncodeTime: func(t time.Time, enc zapcore.PrimitiveArrayEncoder) {
|
||||
enc.AppendString(t.Format("2006-01-02 15:04:05"))
|
||||
enc.AppendString(t.Format(time.DateTime))
|
||||
},
|
||||
CallerKey: "file",
|
||||
EncodeCaller: zapcore.ShortCallerEncoder,
|
||||
|
|
Loading…
Reference in New Issue