去除所有的system.print, 优化日志显示

This commit is contained in:
panlinlin
2021-04-26 11:37:54 +08:00
parent b92027f31e
commit f7a2d2a92d
21 changed files with 124 additions and 66 deletions

View File

@@ -251,7 +251,7 @@ public class ZLMHttpHookListener {
JSONArray tracks = json.getJSONArray("tracks");
boolean regist = json.getBoolean("regist");
if (tracks != null) {
System.out.println("on_stream_changed->>" + schema);
logger.info("[stream: " + streamId + "]on_stream_changed->>" + schema);
}
if ("rtmp".equals(schema)){
if ("rtp".equals(app) && !regist ) {

View File

@@ -71,7 +71,6 @@ public class ZLMMediaListManager {
jsonObject.put("app", streamPushItem.getApp());
jsonObject.put("stream", streamPushItem.getStream());
subscribe.addSubscribe(ZLMHttpHookSubscribe.HookType.on_play,jsonObject,(response)->{
System.out.println(1222211111);
updateMedia(response.getString("app"), response.getString("stream"));
});
}

View File

@@ -131,8 +131,8 @@ public class ZLMRESTfulUtils {
}
public JSONObject addFFmpegSource(String src_url, String dst_url, String timeout_ms){
System.out.println(src_url);
System.out.println(dst_url);
logger.info(src_url);
logger.info(dst_url);
Map<String, Object> param = new HashMap<>();
param.put("src_url", src_url);
param.put("dst_url", dst_url);

View File

@@ -189,7 +189,7 @@ public class ZLMRTPServerFactory {
public Boolean startSendRtpStream(Map<String, Object>param) {
Boolean result = false;
JSONObject jsonObject = zlmresTfulUtils.startSendRtp(param);
System.out.println(jsonObject);
logger.info(jsonObject.toJSONString());
if (jsonObject == null) {
logger.error("RTP推流失败: 请检查ZLM服务");
} else if (jsonObject.getInteger("code") == 0) {
@@ -233,7 +233,7 @@ public class ZLMRTPServerFactory {
public Boolean stopSendRtpStream(Map<String, Object>param) {
Boolean result = false;
JSONObject jsonObject = zlmresTfulUtils.stopSendRtp(param);
System.out.println(jsonObject);
logger.info(jsonObject.toJSONString());
if (jsonObject == null) {
logger.error("停止RTP推流失败: 请检查ZLM服务");
} else if (jsonObject.getInteger("code") == 0) {

View File

@@ -154,11 +154,11 @@ public class ZLMRunner implements CommandLineRunner {
* zlm 连接成功或者zlm重启后
*/
private void zLmRunning(MediaServerConfig mediaServerConfig){
logger.info("zlm接入成功...");
logger.info( "[ id: " + mediaServerConfig.getGeneralMediaServerId() + "] zlm接入成功...");
if (autoConfig) saveZLMConfig();
MediaServerConfig mediaInfo = redisCatchStorage.getMediaInfo();
if (mediaInfo != null && System.currentTimeMillis() - mediaInfo.getUpdateTime() < 50){
logger.info("zlm刚刚更新忽略这次更新");
logger.info("[ id: " + mediaServerConfig.getGeneralMediaServerId() + "]zlm刚刚更新忽略这次更新");
return;
}
mediaServerConfig.setLocalIP(mediaIp);