日志优化
This commit is contained in:
parent
70cccf23bc
commit
8b0f1989d3
@ -625,6 +625,7 @@ func TimeoutMiddleware(timeout time.Duration) MessageMiddleware {
|
||||
return result.Data, result.Error
|
||||
case <-time.After(timeout):
|
||||
log.Error("[Middleware] Message : %v timeout after %v", message, timeout)
|
||||
GoUtil.SendFeishuFatal(0, "message_mgr", fmt.Sprintf("Message Handler Timeout\nMessage: %v\nTimeout: %v", message, timeout))
|
||||
return nil, fmt.Errorf("message handler timeout")
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ func (p *Player) GetVarData(key string) interface{} {
|
||||
cache := &VarExpireData{}
|
||||
err := LoadCacheVarData(key, cache)
|
||||
if err != nil {
|
||||
log.Error("GetVarData err : %s, key: %s", err, key)
|
||||
// log.Error("GetVarData err : %s, key: %s", err, key)
|
||||
return nil
|
||||
}
|
||||
return cache.D
|
||||
@ -32,7 +32,7 @@ func (p *Player) GetUserVarData(key string) interface{} {
|
||||
cache := map[string]*VarExpireData{}
|
||||
err := LoadCacheVarData(GoUtil.GetVarKey(int(p.M_DwUin)), &cache)
|
||||
if err != nil {
|
||||
log.Error("GetUserVarData err : %s, key: %s", err, key)
|
||||
// log.Error("GetUserVarData err : %s, key: %s", err, key)
|
||||
return nil
|
||||
}
|
||||
data, ok := cache[key]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user