mirror of
https://gitee.ltd/lxh/logger.git
synced 2025-10-23 23:06:19 +08:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2ba0cf7548 |
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