mirror of
https://gitee.ltd/lxh/logger.git
synced 2025-10-23 14:56:16 +08:00
🐛 修复多余的控制台打印
This commit is contained in:
2
loki.go
2
loki.go
@@ -26,8 +26,6 @@ func initLokiCore() zapcore.Core {
|
|||||||
|
|
||||||
// 自定义时间输出格式
|
// 自定义时间输出格式
|
||||||
customTimeEncoder := func(t time.Time, enc zapcore.PrimitiveArrayEncoder) {
|
customTimeEncoder := func(t time.Time, enc zapcore.PrimitiveArrayEncoder) {
|
||||||
aa := t.Format("2006-01-02 15:04:05.000")
|
|
||||||
fmt.Println(aa)
|
|
||||||
enc.AppendString(t.Format("2006-01-02 15:04:05.000"))
|
enc.AppendString(t.Format("2006-01-02 15:04:05.000"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user