优化日志

This commit is contained in:
hahwu 2026-04-03 11:04:34 +08:00
parent b88272d00d
commit ff0d901e2a

View File

@ -243,12 +243,16 @@ func HandleClientReq(args []interface{}) {
return
}
detailMsg, err := UnmarshalProtoMessageByName(m.GetFunc(), buf)
str, _ := protojson.Marshal(detailMsg)
str := ""
if conf.Server.GameName == "pet_home" || conf.Server.GameName == "merge_pet_sdk" {
strbuf, _ := protojson.Marshal(detailMsg)
str = string(strbuf)
}
p.(*Player).ProcessTrigger()
p.(*Player).TeLog("func_exec_time", map[string]interface{}{
"method_name": m.GetFunc(),
"exec_time": fmt.Sprintf("%v", time.Since(start)),
"proto": string(str),
"proto": str,
})
}
}