Fix log level
This commit is contained in:
@@ -8,12 +8,12 @@ include_directories(${CMAKE_SOURCE_DIR}/src)
|
||||
include_directories(/opt/MESA/include/)
|
||||
include_directories(/opt/MESA/include/tsg/)
|
||||
|
||||
set(FW_DNS_PLUG_DEPEND_DYN_LIB MESA_handle_logger MESA_prof_load maatframe pthread MESA_field_stat2)
|
||||
set(FW_DNS_PLUG_DEPEND_DYN_LIB maatframe pthread MESA_field_stat2)
|
||||
|
||||
add_library(fw_dns_plug SHARED ${SRC})
|
||||
target_link_libraries(fw_dns_plug ${FW_DNS_PLUG_DEPEND_DYN_LIB})
|
||||
set_target_properties(fw_dns_plug PROPERTIES PREFIX "")
|
||||
|
||||
install(TARGETS fw_dns_plug LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/plug/business/fw_dns_plug COMPONENT LIBRARY)
|
||||
install(TARGETS fw_dns_plug LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/plug/business/fw_dns_plug COMPONENT LIBRARIES)
|
||||
install(FILES ../bin/fw_dns_plug.inf DESTINATION ${CMAKE_INSTALL_PREFIX}/plug/business/fw_dns_plug COMPONENT PROFILE)
|
||||
|
||||
|
||||
@@ -314,6 +314,10 @@ static int fw_dns_send_log(struct streaminfo *a_stream, dns_info_t *dns_info, st
|
||||
get_rr_str2json(object, dns_info, &dns_sec);
|
||||
rr_buf=cJSON_PrintUnformatted(object);
|
||||
TLD_append(handle, (char *)"dns_rr", (void *)rr_buf, TLD_TYPE_STRING);
|
||||
|
||||
cJSON_Delete(object);
|
||||
object=NULL;
|
||||
|
||||
free(rr_buf);
|
||||
rr_buf=NULL;
|
||||
|
||||
@@ -338,10 +342,15 @@ extern "C" char FW_DNS_PLUG_ENTRY(stSessionInfo* session_info, void **pme, int
|
||||
struct Maat_rule_t result[MAX_RESULT_NUM], *p_result=NULL;
|
||||
dns_info_t *dns_info=(dns_info_t *)session_info->app_info;
|
||||
|
||||
if(dns_info==NULL || strlen((char *)dns_info->query_question.qname)==0)
|
||||
if(dns_info==NULL)
|
||||
{
|
||||
return state;
|
||||
}
|
||||
|
||||
if(strlen((char *)dns_info->query_question.qname)==0)
|
||||
{
|
||||
MESA_handle_runtime_log(g_fw_dns_plug_info.logger,
|
||||
RLOG_LV_FATAL,
|
||||
RLOG_LV_DEBUG,
|
||||
"DNS_PLUG",
|
||||
"Qname is %s, addr: %s",
|
||||
(dns_info==NULL) ? "NULL" : ((strlen((char *)dns_info->query_question.qname)==0) ? "NULL" : (char *)dns_info->query_question.qname),
|
||||
|
||||
Reference in New Issue
Block a user