You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environments (please complete the following information):**
- OS: [e.g. Linux]
- go-zero version [e.g. 1.2.1]
- goctl version [e.g. 1.2.1, optional]
**More description**
go-zero 的日志轮转,我发现在使用 zap 的时候 日志会混乱,{"level":"error","ts":"2024-09-25T16:22:30.567+0800","caller":"logger/logging_test.go:150","msg":"test msg","
"a":123,"v":1g_test.go:1374-09-25T16:22:30.567+0800","caller":"logger/logging_test.go:150","msg":"test msg","a":123,"v":1}
"a":123,"v":1g_test.go:1374-09-25T16:22:30.567+0800","caller":"logger/logging_test.go:150","msg":"test msg","a":123,"v":1}
"a":123,"v":1g_test.go:1374-09-25T16:22:30.567+0800","caller":"logger/logging_test.go:150","msg":"test msg","a":123,"v":1}
"a":123,"v":1g_test.go:1374-09-25T16:22:30.567+0800","caller":"logger/logging_test.go:150","msg":"test msg","
"a":123,"v":1g_test.go:1374-09-25T16:22:30.567+0800","caller":"logger/logging_test.go:150","msg":"test msg","v":1,"a":123}
"a":123,"v":1g_test.go:1374-09-25T16:22:30.567+0800","caller":"logger/logging_test.go:150","msg":"test msg","v":1,"a":123}
"a":123,"v":1g_test.go:1374-09-25T16:22:30.567+0800","caller":"logger/logging_test.go:150","msg":"test msg","v":1,"a":123}输出类似这种,我仔细看了一下是 channel 缓冲导致的,在同时打印多种日志级别即会出现
The text was updated successfully, but these errors were encountered:
kevwan
changed the title
日志轮转格式混乱,导致被截取和没有对应的换行等
The log rotation format is chaotic, leading to truncation and missing corresponding line breaks.
Sep 25, 2024
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior, if applicable:
The code is
}
{"level":"info","ts":1727265133.6969411,"msg":"hello world"}
{"level":"info","ts":1727265133.6969411,"msg":"hello world"}{"level":"error","ts":1727265133.6970549,"msg":"hello world"}{"level":"error","ts":1727265133.6970549,"msg":"hello world"}
{"level":"info","ts"::1727265133.697073,"msg":"hello world"}
{"level":"info","ts":1727265133.697075,"msg":"hello world"}
{"level":"error","ts":1727265133.6970859,"msg":"hello world"{"level":"error","ts":1727265133.6970859,"msg":"hello world"}
{"level":"info","ts":1727265133.697118,"msg":"hello world"}
}
{"level":"info","ts":1727265133.697118,"msg":"hello world"}
}{"level":"error","ts":1727265133.69714,"msg":"hello world"}
{"level":"error","ts":1727265133.69714,"msg":"hello world"}
{"level":"info","ts":1727265133.6971579,"msg":"hello world"}
{"level":"info","ts":1727265133.6971579,"msg":"hello world"}{"level":"info","ts":1727265133.6971579,"msg":"hello world"}{"level":"info","ts":1727265133.6971579,"msg":"hello world"}
{"level":"warn","ts":1727265133.697186,"msg":"hello world"}
The text was updated successfully, but these errors were encountered: