日志优化
This commit is contained in:
parent
f063cd199c
commit
48aae65afd
@ -62,7 +62,7 @@ func (f *FriendTreasureMod) Flip(Pos int) ([]*item.Item, int64, error) {
|
||||
}
|
||||
f.Shift++
|
||||
Info := f.List[Pos]
|
||||
log.Debug("pos:%v, info:%v", Pos, Info)
|
||||
//log.Debug("pos:%v, info:%v", Pos, Info)
|
||||
if Info.Uid != 0 {
|
||||
log.Debug("uid:%v", Info.Uid)
|
||||
f.Uids = append(f.Uids, Info.Uid)
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
FEISHU_WEBHOOK = "https://gadmin.bywaystudios.com/api/feishu/notify"
|
||||
FEISHU_WEBHOOK = "https://gadmin.bywaystudios.com/api/alibaba/game/notify"
|
||||
FEISHU_ORDER = "https://gadmin.bywaystudios.com/api/feishu/notify/order"
|
||||
)
|
||||
|
||||
@ -21,10 +21,9 @@ func SendFeishuFatal(PlayerId int, FuncName string, msg string) error {
|
||||
stack := make([]byte, 1024)
|
||||
length := runtime.Stack(stack, false)
|
||||
payload := map[string]interface{}{
|
||||
"notify_msg": fmt.Sprintf("游戏接口出错 %s:%d", conf.Server.GameName, PlayerId),
|
||||
"host": FuncName,
|
||||
"event_name": fmt.Sprintf("%s\nStack trace:\n%s", msg, stack[:length]),
|
||||
"severity": "High",
|
||||
"notify_msg": fmt.Sprintf("游戏接口出错 %s:%d[炸弹][炸弹][炸弹]", conf.Server.GameName, PlayerId),
|
||||
"func_name": FuncName,
|
||||
"stack": fmt.Sprintf("%s\nStack trace:\n%s", msg, stack[:length]),
|
||||
"alarm_time": time.Unix(time.Now().Unix(), 0).Format("2006-01-02 15:04:05"),
|
||||
}
|
||||
|
||||
|
||||
@ -5,11 +5,13 @@ import (
|
||||
activityCfg "server/conf/activity"
|
||||
languageCfg "server/conf/language"
|
||||
userCfg "server/conf/user"
|
||||
GoUtil "server/game_util"
|
||||
"server/msg"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test(t *testing.T) {
|
||||
GoUtil.SendFeishuFatal(0, "Test", "error")
|
||||
i := userCfg.GetEnergyMulByLv(1)
|
||||
fmt.Println(i)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user