执行时间记录转换的简便
logFields := []zap.Field{
zap.String("time", cost.String()),
}
{"level":"INFO","time":"2022-02-18 14:11:43","caller":"logger/logger.go:89","msg":"Http","time":"2.2576ms"}
推荐文章: