Browse Source

去除多余日志

shaohongbo 3 years ago
parent
commit
6c4fcda6f3

+ 1 - 0
pom.xml

@@ -4,6 +4,7 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
+
     <parent>
         <groupId>com.persagy</groupId>
         <artifactId>apm-package</artifactId>

+ 6 - 6
src/main/java/com/persagy/apm/diagnose/indicatorrecord/service/impl/MonitorIndicatorRecordServiceImpl.java

@@ -137,7 +137,7 @@ public class MonitorIndicatorRecordServiceImpl implements IMonitorIndicatorRecor
 
 
     private AsyncResult<String> computeProjectIndicatorData(ProjectDTO projectDTO, ProjectIndicatorCompute projectIndicatorCompute) throws Exception {
-        log.info(Thread.currentThread().getName() + "开始计算[{}]的设备运行诊断监测指标", projectDTO.getProjectId());
+//        log.info(Thread.currentThread().getName() + "开始计算[{}]的设备运行诊断监测指标", projectDTO.getProjectId());
 
         //判断当前计算轮次是否大于缓存中最新计算轮次,如果是,则证明已经被计算过,则略过
         if (checkProjectIsCalcd(projectDTO.getProjectId(), projectIndicatorCompute)) {
@@ -157,7 +157,7 @@ public class MonitorIndicatorRecordServiceImpl implements IMonitorIndicatorRecor
         }
 
         Set<String> objIdAndIndicatorId = getObjIdAndInfoCodeFromRules(projectAlarmRules);
-        log.debug(Thread.currentThread().getName() + "共有{}个监测指标需要计算", objIdAndIndicatorId.size());
+//        log.debug(Thread.currentThread().getName() + "共有{}个监测指标需要计算", objIdAndIndicatorId.size());
         if (CollectionUtils.isEmpty(objIdAndIndicatorId)) {
             return new AsyncResult<>("【监测指标数据计算线程】当前项目:" + projectDTO.getProjectId() + "报警规则未关联对象");
         }
@@ -432,7 +432,7 @@ public class MonitorIndicatorRecordServiceImpl implements IMonitorIndicatorRecor
     private void sendIndicatorDataToAlarmServer(ProjectDTO projectDTO) throws Exception {
         //通过报警服务查询报警规则
         List<AlarmRuleDTO> projectAlarmRules = energyAlarmService.getProjectAlarmRules(projectDTO.getProjectId());
-        log.error("获取到的项目报警规则:" + projectDTO.getProjectId() + ";" + projectAlarmRules);
+//        log.error("获取到的项目报警规则:" + projectDTO.getProjectId() + ";" + projectAlarmRules);
         if (CollectionUtils.isEmpty(projectAlarmRules)) {
             return;
         }
@@ -441,7 +441,7 @@ public class MonitorIndicatorRecordServiceImpl implements IMonitorIndicatorRecor
         if (CollectionUtils.isEmpty(objIdAlarmItemCodeAndInfoCodes) || objIdAlarmItemCodeAndInfoCodes.size() == 0) {
             return;
         }
-        log.error("获取到的设备与监测点位映射关系:" + objIdAlarmItemCodeAndInfoCodes);
+//        log.error("获取到的设备与监测点位映射关系:" + objIdAlarmItemCodeAndInfoCodes);
         for (Map.Entry<String, List<String>> entry : objIdAlarmItemCodeAndInfoCodes.entrySet()) {
             String objIdAndAlarmItemCode = entry.getKey();
             int indexOf = objIdAndAlarmItemCode.indexOf("_");
@@ -460,12 +460,12 @@ public class MonitorIndicatorRecordServiceImpl implements IMonitorIndicatorRecor
 
             //通过redis查询对象该报警类型下的发数截止时间
             ConfigItemDataSendTimeDTO configItemSendTimeDTO = getConfigItemSendTimeDTO(projectDTO, objIdAndAlarmItemCode);
-            log.error("发数截止时间:" + objIdAndAlarmItemCode + "," + configItemSendTimeDTO);
+//            log.error("发数截止时间:" + objIdAndAlarmItemCode + "," + configItemSendTimeDTO);
             Date lastSendTime = configItemSendTimeDTO.getLastSendTime();
             Date endTime = getSendEndTime(lastSendTime);
 
             Map<String, List<MonitorIndicatorRecord>> timeKeyAndRecordList = getTimekeyAndRecordListGteLt(projectDTO, objId, infCodeList, lastSendTime, endTime);
-            log.error("本次需要发的数:" + timeKeyAndRecordList);
+//            log.error("本次需要发的数:" + timeKeyAndRecordList);
             if (timeKeyAndRecordList == null) {
                 continue;
             }