add mq log in rpt
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
#include "db_interface.h"
|
||||
#include "../json/mms_json_inter.h"
|
||||
#include "../cfg_parse/custom_printf.h"//lnk20250225
|
||||
#include "../log4cplus/log4.h"//lnk添加log4 20250526
|
||||
/************************************************************************/
|
||||
/* For debug version, use a static pointer to avoid duplication of */
|
||||
/* __FILE__ strings. */
|
||||
@@ -853,6 +854,16 @@ ST_VOID u_iec_rpt_ind_data_by_devtype(MVL_VAR_ASSOC** info_va,
|
||||
printf("[BEGIND Process] Received Report From %s:%d %s %s ,va_total = %i ,【count = %i】 \n",
|
||||
chnl_usr->ip_str, chnl_usr->chnl->port, LD_info->LD_name, rcb_info->RptID, va_total, rptinfo->count);
|
||||
|
||||
//监测点日志的key,lnk20250526
|
||||
char full_key_m_c[256]; // 分配足够空间
|
||||
char full_key_m_d[256]; // 分配足够空间
|
||||
snprintf(full_key_m_c, sizeof(full_key_m_c), "monitor.%s.COM", LD_info->mp_id);
|
||||
snprintf(full_key_m_d, sizeof(full_key_m_d), "monitor.%s.DATA", LD_info->mp_id);
|
||||
//监测点日志的key,lnk20250526
|
||||
|
||||
//mq日志
|
||||
DIY_INFOLOG(full_key_m_d,"【NORMAL】前置收到监测点:%s - id:%s的报告,报告名称:%s,监测点对应终端的ip和端口是: %s:%d,报告总数:%i,当前报告数:%i", LD_info->name,LD_info->mp_id,rcb_info->RptID,chnl_usr->ip_str,chnl_usr->chnl->port,va_total, rptinfo->count);
|
||||
|
||||
//apr_time_t previousTime = apr_time_now();//
|
||||
//apr_time_exp_t localTime;
|
||||
//apr_time_exp_gmt(&localTime, previousTime);
|
||||
@@ -1150,10 +1161,16 @@ ST_VOID u_iec_rpt_ind_data_by_devtype(MVL_VAR_ASSOC** info_va,
|
||||
else {
|
||||
echo_err3("Ignore this report due to line_id invalid , Report From %s %s %s !!!",
|
||||
APR_EGENERAL, chnl_usr->ip_str, LD_info->LD_name, rcb_info->RptID);
|
||||
//mq日志
|
||||
DIY_ERRORLOG(full_key_m_d,"【ERROR】前置不处理这个监测点:%s - id:%s的报告,报告名称:%s,原因是监测点的序号非法", LD_info->name,LD_info->mp_id,rcb_info->RptID);
|
||||
|
||||
}
|
||||
printf("[END Process] Report From %s:%d %s %s ,va_total = %i ,【count = %i】 \n",
|
||||
chnl_usr->ip_str, chnl_usr->chnl->port, LD_info->LD_name, rcb_info->RptID, va_total, rptinfo->count);
|
||||
|
||||
//mq日志
|
||||
DIY_INFOLOG(full_key_m_d,"【NORMAL】前置处理监测点:%s - id:%s的报告结束,报告名称:%s,监测点对应终端的ip和端口是: %s:%d,报告总数:%i,当前报告数:%i", LD_info->name,LD_info->mp_id,rcb_info->RptID,chnl_usr->ip_str,chnl_usr->chnl->port,va_total, rptinfo->count);
|
||||
|
||||
//apr_time_t previousTimeend = apr_time_now();//
|
||||
//apr_time_exp_t localTimeend;
|
||||
//apr_time_exp_gmt(&localTimeend, previousTimeend);
|
||||
|
||||
Reference in New Issue
Block a user