增加日志

This commit is contained in:
hahwu 2026-04-17 16:38:59 +08:00
parent 5649f3dbe7
commit 9440308008
2 changed files with 5 additions and 13 deletions

View File

@ -682,16 +682,8 @@ func ReqGmCommand_(player *Player, Command string) error {
}
}
case "varset":
b := SetFriendApplyNotification(int(player.M_DwUin))
log.Debug("varset1 %v", b)
b = SetFriendApplyNotification(int(player.M_DwUin))
log.Debug("varset2 %v", b)
ResetFriendApplyNotification(int(player.M_DwUin))
b = SetFriendApplyNotification(int(player.M_DwUin))
log.Debug("varset3 %v", b)
SetPetroomGameNotification(int(player.M_DwUin), 0)
count, send := GetPetroomGameNotification(int(player.M_DwUin))
log.Debug("varset4 count:%d, send:%d", count, send)
p := new(Player)
p.SetVarDataAsync(notifyKeyFriendApply, 1, 105372, 0)
case "catScore":
score := GoUtil.Int(arg[1])
player.GetCatReturnGiftMod().AddScore(score)

View File

@ -874,7 +874,7 @@ func NotifyPlayer(uid, pushid int, title, content string) {
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
log.Debug("notify error:", err)
return
}
d, _ := time.ParseDuration("30m")
@ -898,14 +898,14 @@ func NotifyPlayer(uid, pushid int, title, content string) {
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
log.Debug("notify error:", err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
log.Debug("notify error:", err)
return
}
log.Debug("notification send uid %d, type %d , res %s", uid, pushid, string(body))