fix regist log too much
This commit is contained in:
@@ -363,7 +363,22 @@ void ChannelCheckIECReports(chnl_usr_t *chnl_usr)
|
||||
chnl_usr->chnl_id, rptinfo->IntgPd,rptinfo->TrgOpt );
|
||||
|
||||
//mq日志
|
||||
DIY_WARNLOG(full_key_m_c,"【WARN】监测点:%s - id:%s注册报告失败,报告名:%s", LD_info->name,LD_info->mp_id,rpt_inst_name);
|
||||
// 仅在还没达到5次上限时打印
|
||||
if (!LD_info->has_logged_regist) {
|
||||
LD_info->registcount++;
|
||||
|
||||
if (LD_info->registcount <= 5) {
|
||||
DIY_WARNLOG(full_key_m_c, "【WARN】监测点:%s - id:%s注册报告失败,报告名:%s",
|
||||
LD_info->name, LD_info->mp_id, rpt_inst_name);
|
||||
}
|
||||
|
||||
// 到5次就不再打印,并标记
|
||||
if (LD_info->registcount > 5) {
|
||||
LD_info->has_logged_regist = true;
|
||||
DIY_WARNLOG(full_key_m_c, "【WARN】监测点:%s - id:%s注册报告失败日志已达本次注册上限,不再输出,请检查装置icd和映射文件是否匹配或者装置存在过多连接",
|
||||
LD_info->name, LD_info->mp_id);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
@@ -381,6 +396,8 @@ void ChannelCheckIECReports(chnl_usr_t *chnl_usr)
|
||||
rptinfo->IntgPd,rptinfo->TrgOpt,rptinfo->OptFlds[0],rptinfo->OptFlds[1] );
|
||||
|
||||
//mq日志
|
||||
LD_info->has_logged_regist = FALSE;
|
||||
LD_info->registcount = 0;
|
||||
DIY_WARNLOG(full_key_m_c,"【WARN】监测点:%s - id:%s注册报告成功,报告名:%s", LD_info->name,LD_info->mp_id,rpt_inst_name);
|
||||
|
||||
// add here to GI not the same time
|
||||
|
||||
Reference in New Issue
Block a user