log输出

back_recharge
xuexinpeng 2023-05-22 15:07:11 +08:00
parent 233fb6764e
commit e9cea00128
2 changed files with 7 additions and 4 deletions

View File

@ -419,17 +419,18 @@ public class AreaManager {
if (defaultServerId == GameApplication.serverId){
return defaultServerId;
}
Integer serverIdByUid = RedisUtil.getInstence().getObject(RedisKey.CUser_ServerId_Key, Integer.toString(uid), Integer.class, GlobalsDef.REDIS_OVER_TIME_DAY * 10);
if (serverIdByUid != null && !CoreLogic.getInstance().isHefu(serverIdByUid)) {
LOGGER.info("uid=>{},defaultId =>{},getServerIdByUid1->{}",uid,defaultServerId,serverIdByUid);
return serverIdByUid;
}
LOGGER.info("uid=>{},defaultId =>{},getServerIdByUid2",uid,defaultServerId);
int serverIdFromMongo = CoreLogic.getInstance().findServerIdFromMongo(uid);
if (serverIdFromMongo != 0 && !CoreLogic.getInstance().isHefu(serverIdFromMongo)){
LOGGER.info("uid=>{},defaultId =>{},serverIdFromMongo->{}",uid,defaultServerId,serverIdFromMongo);
return serverIdFromMongo;
}
LOGGER.info("uid=>{},defaultId =>{},serverIdFromMongo2",uid,defaultServerId);
return GameApplication.serverId;
}

View File

@ -1767,6 +1767,7 @@ public class PlayerLogic {
public User getUserByRpc(int uid) {
int serverId = AreaManager.getInstance().getServerIdByUid(uid, GameApplication.serverId);
if (serverId == 0) {
LOGGER.info("serverId is Exception serverId={}", serverId);
return null;
}
if (serverId == GameApplication.serverId) {
@ -1779,9 +1780,10 @@ public class PlayerLogic {
}
String rpcString = RedisUtil.getInstence().getObject(RedisKey.LOGIC_SERVER_INFO, Integer.toString(serverId), String.class, -1);
if (rpcString == null) {
LOGGER.info("rpcString Exception serverId1={}", serverId);
return null;
}
LOGGER.info("rpcString serverId2={}", serverId);
String[] split = rpcString.split(":");
if (split.length < 4) {
LOGGER.error("获取玩家rpc地址长度错误rpc{},玩家id{},服务器id{}", rpcString, uid, serverId);