采用新版内置常量

This commit is contained in:
kercylan98 2023-05-05 10:54:33 +08:00
parent 4492af7622
commit 4d1bd7e84c
1 changed files with 1 additions and 1 deletions

View File

@ -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,