sip 监听创建/销毁

支持 hotReload
This commit is contained in:
shikong 2023-08-09 16:20:53 +08:00
parent f2c78c4b78
commit 7eb7f97603
2 changed files with 6 additions and 7 deletions

View File

@ -25,7 +25,7 @@ public class ServerLoggerImpl implements ServerLogger {
if (!showLog) { if (!showLog) {
return; return;
} }
String log = (sender ? "发送: 目标 =>" + from : "接收: 来自 =>" + to) + "\r\n" + message; String log = (sender ? "发送: 目标 =>" + from : "接收: 来自 => " + to) + "\r\n" + message;
this.stackLogger.logInfo(log); this.stackLogger.logInfo(log);
} }
@ -34,7 +34,7 @@ public class ServerLoggerImpl implements ServerLogger {
if (!showLog) { if (!showLog) {
return; return;
} }
String log = (sender ? "发送: 目标 =>" + from : "接收: 来自 =>" + to) + "\r\n" + message; String log = (sender ? "发送: 目标 =>" + from : "接收: 来自 => " + to) + "\r\n" + message;
this.stackLogger.logInfo(log); this.stackLogger.logInfo(log);
} }
@ -43,7 +43,7 @@ public class ServerLoggerImpl implements ServerLogger {
if (!showLog) { if (!showLog) {
return; return;
} }
String log = (sender ? "发送: 目标 =>" + from : "接收: 来自 =>" + to) + "\r\n" + message; String log = (sender ? "发送: 目标 =>" + from : "接收: 来自 => " + to) + "\r\n" + message;
this.stackLogger.logInfo(log); this.stackLogger.logInfo(log);
} }
@ -71,9 +71,8 @@ public class ServerLoggerImpl implements ServerLogger {
if (!showLog) { if (!showLog) {
return; return;
} }
if(sipStack instanceof SIPTransactionStack) { if(sipStack instanceof SIPTransactionStack st) {
SIPTransactionStack sipStack1 = (SIPTransactionStack) sipStack; this.stackLogger = CommonLogger.getLogger(st.getClass());
this.stackLogger = CommonLogger.getLogger(SIPTransactionStack.class);
} }
} }
} }

View File

@ -65,7 +65,7 @@ public class StackLoggerImpl implements StackLogger {
@Override @Override
public void logError(String message, Exception ex) { public void logError(String message, Exception ex) {
// logger.error(message); logger.error(message);
} }
@Override @Override