增加日志
This commit is contained in:
parent
e9d1565115
commit
ecf37639a5
@ -156,7 +156,7 @@ func (w *fileLogWriter) doRotate() error {
|
||||
|
||||
// return error if the last file checked still existed
|
||||
if err == nil {
|
||||
return fmt.Errorf("rotate: cannot find free log number to rename %s", w.Filename)
|
||||
//return fmt.Errorf("rotate: cannot find free log number to rename %s", w.Filename)
|
||||
}
|
||||
|
||||
w.fileWriter.Close()
|
||||
|
||||
@ -926,12 +926,24 @@ func Destroy() {
|
||||
log.Debug("palyer %d 断开连接 写入数据", k)
|
||||
return true
|
||||
})
|
||||
if G_GameLogicPtr.FriendMgr != nil {
|
||||
G_GameLogicPtr.FriendMgr.SaveData()
|
||||
G_GameLogicPtr.RankMgr.SaveData()
|
||||
G_GameLogicPtr.ChampshipMgr.SaveData()
|
||||
G_GameLogicPtr.MailMgr.SaveData()
|
||||
}
|
||||
if G_GameLogicPtr.MessageMgr != nil {
|
||||
G_GameLogicPtr.MessageMgr.SaveData()
|
||||
}
|
||||
if G_GameLogicPtr.VarMgr != nil {
|
||||
G_GameLogicPtr.VarMgr.SaveData()
|
||||
G_GameLogicPtr.MLogManager.Close()
|
||||
}
|
||||
if G_GameLogicPtr.ChampshipMgr != nil {
|
||||
G_GameLogicPtr.ChampshipMgr.SaveData()
|
||||
}
|
||||
if G_GameLogicPtr.MailMgr != nil {
|
||||
G_GameLogicPtr.MailMgr.SaveData()
|
||||
}
|
||||
if G_GameLogicPtr.RankMgr != nil {
|
||||
G_GameLogicPtr.RankMgr.SaveData()
|
||||
}
|
||||
}
|
||||
log.Debug("服务器下线完成")
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ func HandleClientReq(args []interface{}) {
|
||||
// 消息的发送者
|
||||
a := args[1].(gate.Agent)
|
||||
buf := m.GetInfo()
|
||||
// log.Debug("消息Func : %s", m.GetFunc())
|
||||
log.Debug("消息Func : %s", m.GetFunc())
|
||||
switch m.GetFunc() {
|
||||
case "ClientTick":
|
||||
case "ReqChangePassword":
|
||||
@ -119,6 +119,7 @@ func HandleClientReq(args []interface{}) {
|
||||
G_GameLogicPtr.SendServerVersion(a)
|
||||
case "ReqRegisterAccount":
|
||||
detail := &msg.ReqRegisterAccount{}
|
||||
log.Debug("player %s start login", detail.UserName)
|
||||
proto.Unmarshal(buf, detail)
|
||||
gl := G_getGameLogic()
|
||||
defer func() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user