替换 System.out.println

back_recharge
jiahuiwen 2020-09-02 16:27:26 +08:00
parent 9e32a22e06
commit c3aa0b815f
8 changed files with 23 additions and 21 deletions

View File

@ -186,27 +186,27 @@ public class ChatLogic {
break;
case 3: //好友
List<Integer> friends = friendManager.getFriends();
if (!friends.contains(friendId)){
if (!friends.contains(friendId)) {
throw new ErrorCodeException(ErrorCode.CHAT_NOT_FRIENDS);
}
//现在好友推送
if (OnlineUserManager.checkUidOnline(friendId)){
if (OnlineUserManager.checkUidOnline(friendId)) {
ISession sessionByUid = OnlineUserManager.getSessionByUid(friendId);
chatInfo = CBean2Proto.getChatInfoBuilder(user,message,nowTime,0);
chatInfo = CBean2Proto.getChatInfoBuilder(user, message, nowTime, 0);
sendChatInfoIndication = ChatProto.SendChatInfoIndication.newBuilder()
.setChatInfo(chatInfo)
.setType(1)
.build();
assert sessionByUid != null;
MessageUtil.sendIndicationMessage(sessionByUid, 1, MessageTypeProto.MessageType.SEND_CHAT_INFO_INDICATION_VALUE, sendChatInfoIndication, true);
}else{
RedisUtil.getInstence().hset(GameApplication.serverId +RedisKey.CUser_Chat+friendId,uid +"#"+ nowTime,message, -1);
} else {
RedisUtil.getInstence().hset(GameApplication.serverId + RedisKey.CUser_Chat + friendId, uid + "#" + nowTime, message, -1);
}
break;
default:{
break;
}
default: {
break;
}
}
onSendChatSuccess(user,chatType,message);
ReportUtil.onReportEvent(user, ReportEventEnum.SEND_MESSAGE.getType(),String.valueOf(chatType),message);

View File

@ -2,13 +2,15 @@ package com.ljsd.jieling.db.mongo;
import com.google.gson.*;
import com.ljsd.jieling.util.SysUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*;
import java.nio.charset.Charset;
import java.nio.file.Files;
public class MongoUtiltest {
private static final Logger LOGGER = LoggerFactory.getLogger(MongoUtiltest.class);
public static void main(String[] args) {
try {
@ -30,7 +32,7 @@ public class MongoUtiltest {
StringBuilder stringBuilder2 = new StringBuilder();
if (MongoUtil.equill(obj1, obj, stringBuilder,stringBuilder2)) {
System.out.println("匹配");
LOGGER.info("匹配");
} else {
File file3 = new File(SysUtil.getPath("conf/checkout_diffmem__" +dbf3.getName()+ ".txt"));

View File

@ -1,6 +1,8 @@
package com.ljsd.jieling.kefu;
import com.ljsd.jieling.core.Lockeys;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashSet;
import java.util.Set;
@ -11,6 +13,7 @@ import java.util.Set;
* CreateDate: 2020/6/11 11:48
*/
public class Cmd_test_lock extends GmAbstract {
private static final Logger LOGGER = LoggerFactory.getLogger(Cmd_test_lock.class);
@Override
public boolean exec(String[] args) throws Exception {
Set<Integer> sendUids = new HashSet<>();
@ -20,7 +23,7 @@ public class Cmd_test_lock extends GmAbstract {
while (i++<10){
String name = Thread.currentThread().getName();
Thread.currentThread().sleep(1000);
System.out.println("name"+name+" = [" + i + "]");
LOGGER.info("name=>{}, i=>{}",name, i);
}
return true;
}

View File

@ -391,7 +391,7 @@ public class ChampionshipLogic {
MailLogic.getInstance().sendMail(user.getId(), title, content, ItemUtil.getMailReward(sChampionshipReward.getSeasonReward()), nowTime, Global.MAIL_EFFECTIVE_TIME);
}
}catch (Exception e){
System.out.println("Exception e = "+"size"+ arenaRankInfo.size()+ e.toString());
LOGGER.info("Exception e = "+"size"+ arenaRankInfo.size()+ e.toString());
}
MongoUtil.getLjsdMongoTemplate().lastUpdate();

View File

@ -1230,7 +1230,7 @@ public class GuildFightLogic {
public static Family.CarDelayProgressIndication carDelayProgressIndication;
public static void minuteCheckForCarFight() throws Exception {
LOGGER.info("车迟斗法progress={}",carProgress);
LOGGER.info("minuteCheckForCarFight 车迟斗法progress={}",carProgress);
int carProgressTmp =carProgress;
int id =1;
@ -1288,7 +1288,7 @@ public class GuildFightLogic {
}else{
carProgressTmp = -1;
}
System.out.println("当前状态"+carProgressTmp);
LOGGER.info("minuteCheckForCarFight 当前状态=>{}", carProgressTmp);
if(carProgressTmp!=carProgress){
int battleStartTime = 0;
int grapStartTime = 0;
@ -1318,7 +1318,7 @@ public class GuildFightLogic {
public static void sendAllProgressUpdate(){
//向全服玩家广播进度变更信息
System.out.println("状态更改发送推送");
LOGGER.info("sendAllProgressUpdate 状态更改发送推送");
for(ISession session : OnlineUserManager.sessionMap.values()){
MessageUtil.sendIndicationMessage(session,1, MessageTypeProto.MessageType.CAR_DELAY_PROGRESS_INDICATION_VALUE,carDelayProgressIndication,true);
}

View File

@ -406,7 +406,7 @@ public class HeroLogic{
for(int mustId:mustSet){
maxId = mustId>maxId?mustId:maxId;
}
System.out.println("触发必出"+maxId);
LOGGER.info("randomOne uid=>{} 触发必出=>{}", user.getId(), maxId);
SLotterySpecialConfig onConfig = null;
for(SLotterySpecialConfig everyConfig:specialConfigs){
if(everyConfig.getDifferentType()!=maxId){

View File

@ -67,9 +67,6 @@ public class SExchangeRate implements BaseConfig {
}
System.out.println("");
}

View File

@ -124,9 +124,9 @@ public class NettyTCPClientHandler extends SimpleChannelInboundHandler<Object> {
if(msgId == RECONNECT_RESPONSE_VALUE){
rec =true;
}
System.out.println("back hartbeat id : "+msgId);
LOGGER.info("channelRead0 back hartbeat id : {}", msgId);
//System.out.println(JsonFormat.printToString());