Commit f1c8ca602db9dcdf07877631477ca0770d692679
1 parent
8553769e
添加日志
Showing
3 changed files
with
7 additions
and
5 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
| @@ -371,7 +371,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { | @@ -371,7 +371,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { | ||
| 371 | CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId() | 371 | CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId() |
| 372 | : udpSipProvider.getNewCallId(); | 372 | : udpSipProvider.getNewCallId(); |
| 373 | callIdHeader.setCallId(subscribeInfo.getCallId()); | 373 | callIdHeader.setCallId(subscribeInfo.getCallId()); |
| 374 | - | 374 | + logger.info("[发送Notify-MobilePosition] {}/{}->{},{}", parentPlatform.getServerGBId(), gpsMsgInfo.getId(), gpsMsgInfo.getLng(), gpsMsgInfo.getLat()); |
| 375 | sendNotify(parentPlatform, deviceStatusXml.toString(), subscribeInfo, eventResult -> { | 375 | sendNotify(parentPlatform, deviceStatusXml.toString(), subscribeInfo, eventResult -> { |
| 376 | logger.error("发送NOTIFY通知消息失败。错误:{} {}", eventResult.statusCode, eventResult.msg); | 376 | logger.error("发送NOTIFY通知消息失败。错误:{} {}", eventResult.statusCode, eventResult.msg); |
| 377 | }, null); | 377 | }, null); |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
| @@ -146,6 +146,8 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements | @@ -146,6 +146,8 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements | ||
| 146 | } else { | 146 | } else { |
| 147 | mobilePosition.setAltitude(0.0); | 147 | mobilePosition.setAltitude(0.0); |
| 148 | } | 148 | } |
| 149 | + logger.info("[收到Notify-MobilePosition]:{}/{}->{}.{}", mobilePosition.getDeviceId(), mobilePosition.getChannelId(), | ||
| 150 | + mobilePosition.getLongitude(), mobilePosition.getLatitude()); | ||
| 149 | mobilePosition.setReportSource("Mobile Position"); | 151 | mobilePosition.setReportSource("Mobile Position"); |
| 150 | BaiduPoint bp = GpsUtil.Wgs84ToBd09(String.valueOf(mobilePosition.getLongitude()), String.valueOf(mobilePosition.getLatitude())); | 152 | BaiduPoint bp = GpsUtil.Wgs84ToBd09(String.valueOf(mobilePosition.getLongitude()), String.valueOf(mobilePosition.getLatitude())); |
| 151 | logger.info("百度坐标:" + bp.getBdLng() + ", " + bp.getBdLat()); | 153 | logger.info("百度坐标:" + bp.getBdLng() + ", " + bp.getBdLat()); |
| @@ -213,7 +215,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements | @@ -213,7 +215,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements | ||
| 213 | } else { | 215 | } else { |
| 214 | deviceAlarm.setLatitude(0.00); | 216 | deviceAlarm.setLatitude(0.00); |
| 215 | } | 217 | } |
| 216 | - | 218 | + logger.info("[收到Notify-Alarm]:{}/{}", device.getDeviceId(), deviceAlarm.getChannelId()); |
| 217 | if (deviceAlarm.getAlarmMethod().equals("4")) { | 219 | if (deviceAlarm.getAlarmMethod().equals("4")) { |
| 218 | MobilePosition mobilePosition = new MobilePosition(); | 220 | MobilePosition mobilePosition = new MobilePosition(); |
| 219 | mobilePosition.setDeviceId(deviceAlarm.getDeviceId()); | 221 | mobilePosition.setDeviceId(deviceAlarm.getDeviceId()); |
| @@ -279,7 +281,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements | @@ -279,7 +281,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements | ||
| 279 | Element eventElement = itemDevice.element("Event"); | 281 | Element eventElement = itemDevice.element("Event"); |
| 280 | DeviceChannel channel = XmlUtil.channelContentHander(itemDevice); | 282 | DeviceChannel channel = XmlUtil.channelContentHander(itemDevice); |
| 281 | channel.setDeviceId(device.getDeviceId()); | 283 | channel.setDeviceId(device.getDeviceId()); |
| 282 | - logger.debug("收到来自设备【{}】的通道: {}【{}】", device.getDeviceId(), channel.getName(), channel.getChannelId()); | 284 | + logger.info("[收到Notify-Catalog]:{}/{}", device.getDeviceId(), channel.getChannelId()); |
| 283 | switch (eventElement.getText().toUpperCase()) { | 285 | switch (eventElement.getText().toUpperCase()) { |
| 284 | case CatalogEvent.ON: // 上线 | 286 | case CatalogEvent.ON: // 上线 |
| 285 | logger.info("收到来自设备【{}】的通道【{}】上线通知", device.getDeviceId(), channel.getChannelId()); | 287 | logger.info("收到来自设备【{}】的通道【{}】上线通知", device.getDeviceId(), channel.getChannelId()); |
src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java
| @@ -628,14 +628,14 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage { | @@ -628,14 +628,14 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage { | ||
| 628 | @Override | 628 | @Override |
| 629 | public void sendMobilePositionMsg(JSONObject jsonObject) { | 629 | public void sendMobilePositionMsg(JSONObject jsonObject) { |
| 630 | String key = VideoManagerConstants.VM_MSG_SUBSCRIBE_MOBILE_POSITION; | 630 | String key = VideoManagerConstants.VM_MSG_SUBSCRIBE_MOBILE_POSITION; |
| 631 | - logger.debug("[redis 移动位置订阅通知] {}: {}", key, jsonObject.toString()); | 631 | + logger.info("[redis 移动位置订阅通知] {}: {}", key, jsonObject.toString()); |
| 632 | redis.convertAndSend(key, jsonObject); | 632 | redis.convertAndSend(key, jsonObject); |
| 633 | } | 633 | } |
| 634 | 634 | ||
| 635 | @Override | 635 | @Override |
| 636 | public void sendStreamPushRequestedMsg(MessageForPushChannel msg) { | 636 | public void sendStreamPushRequestedMsg(MessageForPushChannel msg) { |
| 637 | String key = VideoManagerConstants.VM_MSG_STREAM_PUSH_REQUESTED; | 637 | String key = VideoManagerConstants.VM_MSG_STREAM_PUSH_REQUESTED; |
| 638 | - logger.debug("[redis 推流被请求通知] {}: {}-{}", key, msg.getApp(), msg.getStream()); | 638 | + logger.info("[redis 推流被请求通知] {}: {}-{}", key, msg.getApp(), msg.getStream()); |
| 639 | redis.convertAndSend(key, (JSONObject)JSON.toJSON(msg)); | 639 | redis.convertAndSend(key, (JSONObject)JSON.toJSON(msg)); |
| 640 | } | 640 | } |
| 641 | } | 641 | } |