日志优化

This commit is contained in:
hahwu 2025-03-20 17:53:45 +08:00
parent 6846d45765
commit bd9cce0536

View File

@ -72,7 +72,7 @@ func HandleClientReq(args []interface{}) {
defer func() {
if r := recover(); r != nil {
GoUtil.SendFeishuFatal(0, m.GetFunc(), fmt.Sprintf("username: %s, fatal: %s", detail.UserName, r))
log.Debug("uid : %d, func : %s, fatal : %s", 0, m.GetFunc(), r)
log.Error("uid : %d, func : %s, fatal : %s", 0, m.GetFunc(), r)
}
}()
if gl.IsExsitAccount(detail.UserName) {
@ -109,7 +109,7 @@ func HandleClientReq(args []interface{}) {
defer func() {
if r := recover(); r != nil {
GoUtil.SendFeishuFatal(0, m.GetFunc(), fmt.Sprintf("username: %s, fatal: %s", detail.UserName, r))
log.Debug("uid : %d, func : %s, fatal : %s", 0, m.GetFunc(), r)
log.Error("uid : %d, func : %s, fatal : %s", 0, m.GetFunc(), r)
}
}()
ResLogin := &msg.ResLogin{}
@ -178,7 +178,7 @@ func HandleClientReq(args []interface{}) {
p.(*Player).args["agent"] = a
err := RunNetProcessByKey(m.GetFunc(), []interface{}{a, buf})
if err != nil {
log.Debug("uid : %d, func : %s, err : %s", p.(*Player).M_DwUin, m.GetFunc(), err)
log.Error("uid : %d, func : %s, err : %s", p.(*Player).M_DwUin, m.GetFunc(), err)
p.(*Player).Recover(backup) //还原Player的数据
return
}