优化全局zap的打印,修复待机任务出现多个的情况

This commit is contained in:
2024-11-12 14:47:20 +08:00
parent 355880c3f9
commit cc12b60437
20 changed files with 181 additions and 84 deletions

View File

@@ -17,7 +17,7 @@ func PayloadJSON[T schema.JsonModel]() leaf.HandlerFunc {
pm := new(T)
err := json.Unmarshal(c.Payload, pm)
if err != nil {
logger.Panicf("报文解析错误: %v\n", err)
logger.Panicln("报文解析错误", err)
}
leaf.WithValue[*T](c, PayloadJSONKey, pm)
c.Next()