调整日志级别
This commit is contained in:
parent
17ad146458
commit
0313c0cd3c
@ -426,7 +426,7 @@ public class TDEngineService {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
pstmt.executeUpdate(sb.toString());
|
pstmt.executeUpdate(sb.toString());
|
||||||
log.info("告警信息入库:{}",sb.toString());
|
log.debug("告警信息入库:{}",sb.toString());
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
log.error("save deviceEvent error", ex);
|
log.error("save deviceEvent error", ex);
|
||||||
}
|
}
|
||||||
|
@ -358,7 +358,7 @@ public class NodeMessageServiceImpl extends TextWebSocketHandler implements Node
|
|||||||
// 使用 TypeReference 来指定转换目标类型
|
// 使用 TypeReference 来指定转换目标类型
|
||||||
List<DeviceEventVo> list = objectMapper.convertValue(dataEvent, new TypeReference<List<DeviceEventVo>>() {
|
List<DeviceEventVo> list = objectMapper.convertValue(dataEvent, new TypeReference<List<DeviceEventVo>>() {
|
||||||
});
|
});
|
||||||
log.info("消息data转化deviceVo,{}", list);
|
log.debug("消息data转化deviceVo,{}", list);
|
||||||
for (DeviceEventVo item : list) {
|
for (DeviceEventVo item : list) {
|
||||||
DeviceInfoCache deviceInfoCache = cacheService.getEquipmentCache().getDeviceInfoCacheById(Long.valueOf(item.getDeviceId()));
|
DeviceInfoCache deviceInfoCache = cacheService.getEquipmentCache().getDeviceInfoCacheById(Long.valueOf(item.getDeviceId()));
|
||||||
Integer firstTriggeredCode = adminRedisTemplate.get(String.format("RT:%s:%s", item.getDeviceId(), "FirstTriggeredCode".toLowerCase()));
|
Integer firstTriggeredCode = adminRedisTemplate.get(String.format("RT:%s:%s", item.getDeviceId(), "FirstTriggeredCode".toLowerCase()));
|
||||||
@ -397,8 +397,8 @@ public class NodeMessageServiceImpl extends TextWebSocketHandler implements Node
|
|||||||
deviceEventInfo.setEventText(item.getAttrCode() + fieldName + descList.get(1));
|
deviceEventInfo.setEventText(item.getAttrCode() + fieldName + descList.get(1));
|
||||||
}
|
}
|
||||||
Integer level = dataService.eventLevelMap.get(model).get(item.getAttrCode());
|
Integer level = dataService.eventLevelMap.get(model).get(item.getAttrCode());
|
||||||
log.info("level:{}", level);
|
log.debug("level:{}", level);
|
||||||
log.info("fieldname{}", fieldName);
|
log.debug("fieldname{}", fieldName);
|
||||||
deviceEventInfo.setEventLevel(level == null ? 0 : level);
|
deviceEventInfo.setEventLevel(level == null ? 0 : level);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -448,7 +448,7 @@ public class NodeMessageServiceImpl extends TextWebSocketHandler implements Node
|
|||||||
}
|
}
|
||||||
ConcurrentWebSocketSessionDecorator concurrentWebSocketSessionDecorator = new ConcurrentWebSocketSessionDecorator(session, 5 * 1000, 2 * 1024 * 1024);
|
ConcurrentWebSocketSessionDecorator concurrentWebSocketSessionDecorator = new ConcurrentWebSocketSessionDecorator(session, 5 * 1000, 2 * 1024 * 1024);
|
||||||
onlineWSSessions.put(nodeId, concurrentWebSocketSessionDecorator);
|
onlineWSSessions.put(nodeId, concurrentWebSocketSessionDecorator);
|
||||||
|
log.info("节点:{}已连接, IP: {}", nodeId, remoteIp);
|
||||||
//如果采集程序的版本是0,则直接下发当前配置。
|
//如果采集程序的版本是0,则直接下发当前配置。
|
||||||
if (version == 0) {
|
if (version == 0) {
|
||||||
sendTerminalConfig(nodeId);
|
sendTerminalConfig(nodeId);
|
||||||
@ -485,7 +485,7 @@ public class NodeMessageServiceImpl extends TextWebSocketHandler implements Node
|
|||||||
@Override
|
@Override
|
||||||
protected void handlePongMessage(WebSocketSession session, PongMessage message) throws Exception {
|
protected void handlePongMessage(WebSocketSession session, PongMessage message) throws Exception {
|
||||||
Long nodeId = (Long) session.getAttributes().get(NodeConstant.NODE_ID);
|
Long nodeId = (Long) session.getAttributes().get(NodeConstant.NODE_ID);
|
||||||
log.info("收到 Node:{} Pong Message", nodeId);
|
log.debug("收到 Node:{} Pong Message", nodeId);
|
||||||
session.getAttributes().put(NodeConstant.LAST_PONG_TIME, System.currentTimeMillis());
|
session.getAttributes().put(NodeConstant.LAST_PONG_TIME, System.currentTimeMillis());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user