全面替换log为zap
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"game-driver/internal/schema"
|
||||
"game-driver/leaf"
|
||||
"log"
|
||||
"game-driver/pkg/logger"
|
||||
)
|
||||
|
||||
type JSONKey string
|
||||
@@ -17,7 +17,7 @@ func PayloadJSON[T schema.JsonModel]() leaf.HandlerFunc {
|
||||
pm := new(T)
|
||||
err := json.Unmarshal(c.Payload, pm)
|
||||
if err != nil {
|
||||
log.Panicf("报文解析错误: %v\n", err)
|
||||
logger.Panicf("报文解析错误: %v\n", err)
|
||||
}
|
||||
leaf.WithValue[*T](c, PayloadJSONKey, pm)
|
||||
c.Next()
|
||||
|
||||
Reference in New Issue
Block a user