修改日志级别

This commit is contained in:
sk 2024-11-27 13:42:07 +08:00
parent 27f70e1a94
commit 1d89c089c1
4 changed files with 12 additions and 12 deletions

View File

@ -42,7 +42,7 @@ func Register(key string, msgType interface{}, f func(ctx context.Context, compl
logger.Logger.Errorf("ETCD %v proto.Unmarshal error:%v", key, err)
continue
}
logger.Logger.Tracef("ETCD 拉取成功 %v ==> %v", string(res.Kvs[i].Key), d)
logger.Logger.Debugf("ETCD 拉取成功 %v ==> %v", string(res.Kvs[i].Key), d)
event := &clientv3.Event{
Type: 0,
}
@ -53,7 +53,7 @@ func Register(key string, msgType interface{}, f func(ctx context.Context, compl
logger.Logger.Errorf("ETCD %v josn.Unmarshal error:%v", key, err)
continue
}
logger.Logger.Tracef("ETCD 拉取成功 %v ==> %v", string(res.Kvs[i].Key), d)
logger.Logger.Debugf("ETCD 拉取成功 %v ==> %v", string(res.Kvs[i].Key), d)
event := &clientv3.Event{
Type: 0,
}

View File

@ -108,7 +108,7 @@ func (c *MessageMgr) RegisterHandler(param *RegisterHandlerParam) {
logger.Logger.Errorf("RabbitMQ Unmarshal error: %v", err)
return
}
logger.Logger.Tracef("==> Receive RabbitMQ(%v): %#v", param.Name, log)
logger.Logger.Tracef("MQ Receive[%v]: %#v", param.Name, log)
return c.handler[param.Name].F(log)
}
@ -178,7 +178,7 @@ func StopPublisher() {
func Send(topic string, msg interface{}, opts ...broker.PublishOption) (err error) {
if globalPublisher != nil {
logger.Logger.Tracef("==> RabbitMQ(%v): %#v", topic, msg)
logger.Logger.Tracef("MQ Send[%v]: %#v", topic, msg)
return globalPublisher.Send(topic, msg, opts...)
}
logger.Logger.Errorf("RabbitMQPublisher not start!")

View File

@ -137,7 +137,7 @@ func (c *CustomRoomMgr) GetRoomList(plt string) []*gamehall.PrivateRoomInfo {
}
func (c *CustomRoomMgr) tryCreate(plt string, configId int32) {
logger.Logger.Tracef("尝试创建竞技馆系统房间 %v CloseCustomRoomCreate:%v", configId, model.GameParamData.CloseCustomRoomCreate)
logger.Logger.Debugf("尝试创建竞技馆系统房间 %v CloseCustomRoomCreate:%v", configId, model.GameParamData.CloseCustomRoomCreate)
cfg := PlatformMgrSingleton.GetConfig(plt).RoomConfigSystem[configId]
if model.GameParamData.CloseCustomRoomCreate || cfg == nil || cfg.GetOn() == common.Off {
return
@ -162,7 +162,7 @@ func (c *CustomRoomMgr) tryCreate(plt string, configId int32) {
}
func (c *CustomRoomMgr) TryDestroy(plt string, configId int32) {
logger.Logger.Tracef("尝试解散竞技馆系统房间 %v", configId)
logger.Logger.Debugf("尝试解散竞技馆系统房间 %v", configId)
cfg := PlatformMgrSingleton.GetConfig(plt).RoomConfigSystem[configId]
if cfg == nil {
return
@ -190,7 +190,7 @@ func (c *CustomRoomMgr) TryDestroy(plt string, configId int32) {
}
func (c *CustomRoomMgr) Release(plt string, configId int32) {
logger.Logger.Tracef("释放竞技馆房间创建记录 %v", configId)
logger.Logger.Debugf("释放竞技馆房间创建记录 %v", configId)
v, ok := c.data[plt]
if !ok || v == nil {
return
@ -261,7 +261,7 @@ func (c *CustomRoomMgr) UpdateCreate(plt string, configId int32, mustCreate bool
}
if cfg.GetAutoCreate() == 1 || mustCreate {
logger.Logger.Tracef("Update 竞技馆系统房间创建 %v", configId)
logger.Logger.Debugf("Update 竞技馆系统房间创建 %v", configId)
f(func() {
gf = PlatformMgrSingleton.GetGameFree(plt, cfg.GetGameFreeId())
if gf == nil || !gf.GetStatus() || cfg.GetOn() == common.Off {
@ -307,7 +307,7 @@ func (c *CustomRoomMgr) UpdateCreate(plt string, configId int32, mustCreate bool
IsRecruit: true,
})
if scene != nil {
logger.Logger.Tracef("竞技馆系统房间创建成功 roomId:%v", scene.sceneId)
logger.Logger.Debugf("竞技馆系统房间创建成功 roomId:%v", scene.sceneId)
csp.AddScene(scene)
info.Scene = scene
} else {
@ -339,7 +339,7 @@ func (c *CustomRoomMgr) UpdateCreate(plt string, configId int32, mustCreate bool
})
}
info.Notify(common.ListAdd)
logger.Logger.Tracef("竞技馆假房间创建成功 %v", info.PrivateRoomInfo)
logger.Logger.Debugf("竞技馆假房间创建成功 %v", info.PrivateRoomInfo)
if cfg.FullTime <= 0 {
cfg.FullTime = int32(model.GameParamData.SceneMaxIdle)
}
@ -347,7 +347,7 @@ func (c *CustomRoomMgr) UpdateCreate(plt string, configId int32, mustCreate bool
cfg.FullTime = 3 // 至少3秒
}
b, _ := timer.AfterTimer(func(h timer.TimerHandle, ud interface{}) bool {
logger.Logger.Tracef("竞技馆假房间解散 %v", info)
logger.Logger.Debugf("竞技馆假房间解散 %v", info)
c.Release(plt, configId)
c.UpdateCreate(plt, configId, false)
return true

View File

@ -120,7 +120,7 @@ func (l *LotteryData) Reset() {
l.CostCard = 0
l.RobotCodeCount = 0
l.PlayerNum = 0
logger.Logger.Tracef("LotteryData Reset: %v", l.CId)
logger.Logger.Debugf("LotteryData Reset: %v", l.CId)
}
// GetCode 获取抽奖码