修复历史文件拉取异常

This commit is contained in:
zxb 2023-08-21 16:55:00 +08:00
parent 19f7dc21a1
commit 17278523d9
2 changed files with 9 additions and 21 deletions

View File

@ -9,12 +9,11 @@ import gov.nist.javax.sip.stack.SIPTransactionStack;
import javax.sip.SipStack;
import java.util.Properties;
@SuppressWarnings("unused")
public class ServerLoggerImpl implements ServerLogger {
private boolean showLog = true;
private SIPTransactionStack sipStack;
protected StackLogger stackLogger;
@Override
@ -27,12 +26,8 @@ public class ServerLoggerImpl implements ServerLogger {
if (!showLog) {
return;
}
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(sender? "发送:目标--->" + from:"接收:来自--->" + to)
.append("\r\n")
.append(message);
this.stackLogger.logInfo(stringBuilder.toString());
String log = (sender ? "发送: 目标 => " + to : "接收: 来自 => " + from) + "\r\n" + message;
this.stackLogger.logInfo(log);
}
@Override
@ -40,11 +35,8 @@ public class ServerLoggerImpl implements ServerLogger {
if (!showLog) {
return;
}
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(sender? "发送: 目标->" + from :"接收:来自->" + to)
.append("\r\n")
.append(message);
this.stackLogger.logInfo(stringBuilder.toString());
String log = (sender ? "发送: 目标 => " + to : "接收: 来自 => " + from) + "\r\n" + message;
this.stackLogger.logInfo(log);
}
@Override
@ -52,11 +44,8 @@ public class ServerLoggerImpl implements ServerLogger {
if (!showLog) {
return;
}
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(sender? "发送: 目标->" + from :"接收:来自->" + to)
.append("\r\n")
.append(message);
this.stackLogger.logInfo(stringBuilder.toString());
String log = (sender ? "发送: 目标 => " + to : "接收: 来自 => " + from) + "\r\n" + message;
this.stackLogger.logInfo(log);
}
@Override
@ -84,8 +73,7 @@ public class ServerLoggerImpl implements ServerLogger {
return;
}
if(sipStack instanceof SIPTransactionStack) {
this.sipStack = (SIPTransactionStack)sipStack;
this.stackLogger = CommonLogger.getLogger(SIPTransactionStack.class);
this.stackLogger = CommonLogger.getLogger(sipStack.getClass());
}
}
}

View File

@ -45,7 +45,7 @@ public class RecordEndEventListener implements ApplicationListener<RecordEndEven
logger.debug("handler => {}", handler);
if (handler != null){
handler.handler(event.getRecordInfo());
if (count == sumNum){
if (count >= sumNum){
handlerMap.remove(deviceId + channelId);
}
}