调整调试日志内容

This commit is contained in:
liuxueli
2019-11-26 16:58:54 +08:00
parent 8cfc6b32fd
commit 132d807af1
2 changed files with 13 additions and 8 deletions

View File

@@ -14,7 +14,7 @@
char TSG_MASTER_VERSION_20191125=0; char TSG_MASTER_VERSION_20191126=0;
const char *tsg_conffile="tsgconf/main.conf"; const char *tsg_conffile="tsgconf/main.conf";
g_tsg_para_t g_tsg_para; g_tsg_para_t g_tsg_para;
@@ -100,7 +100,7 @@ static Maat_rule_t *tsg_policy_decision_criteria(Maat_rule_t *result, int result
if(result[i].action==p_result->action) if(result[i].action==p_result->action)
{ {
if(result[i].config_id<p_result->config_id) if(result[i].config_id>p_result->config_id)
{ {
p_result=&result[i]; p_result=&result[i];
} }
@@ -157,7 +157,7 @@ extern "C" char TSG_MASTER_TCP_ENTRY(struct streaminfo *a_tcp, void **pme, int t
FS_operate(g_tsg_para.fs2_handle, g_tsg_para.fs2_field_id[TSG_FS2_HIT_SHARE], 0, FS_OP_ADD, 1); FS_operate(g_tsg_para.fs2_handle, g_tsg_para.fs2_field_id[TSG_FS2_HIT_SHARE], 0, FS_OP_ADD, 1);
MESA_handle_runtime_log(g_tsg_para.logger, MESA_handle_runtime_log(g_tsg_para.logger,
RLOG_LV_DEBUG, RLOG_LV_DEBUG,
"SCAN_IP_AND_DOAMIN", "SCAN_IP_AND_FQDN",
"Hit %s: %s addr: %s", "Hit %s: %s addr: %s",
(identify_info.proto==PROTO_HTTP) ? "host" : "sni", (identify_info.proto==PROTO_HTTP) ? "host" : "sni",
@@ -169,7 +169,7 @@ extern "C" char TSG_MASTER_TCP_ENTRY(struct streaminfo *a_tcp, void **pme, int t
else else
{ {
MESA_handle_runtime_log(g_tsg_para.logger, MESA_handle_runtime_log(g_tsg_para.logger,
RLOG_LV_DEBUG, RLOG_LV_DEBUG,
"SCAN_IP_AND_FQDN", "SCAN_IP_AND_FQDN",
"Not hit %s: %s addr: %s", "Not hit %s: %s addr: %s",

View File

@@ -215,16 +215,21 @@ int tsg_pull_policy_result(struct streaminfo *a_stream, PULL_RESULT_TYPE pull_re
else else
{ {
MESA_handle_runtime_log(g_tsg_para.logger, RLOG_LV_DEBUG, "PULL_RESULT", MESA_handle_runtime_log(g_tsg_para.logger, RLOG_LV_DEBUG, "PULL_RESULT",
"pull policy failed, result_type: %s, addr: %s", "pull policy failed, hit: %s %s: %s policy_id: %d service: %d action: %d addr: %s",
(label->result_type==PULL_KNI_RESULT) ? "KNI" : "FW", (label->result_type==PULL_KNI_RESULT) ? "KNI" : "FW",
label->proto==PROTO_HTTP ? "host" : "sni",
label->domain,
label->result->config_id,
label->result->service_id,
label->result->action,
printaddr(&a_stream->addr, a_stream->threadnum)); printaddr(&a_stream->addr, a_stream->threadnum));
} }
} }
else else
{ {
MESA_handle_runtime_log(g_tsg_para.logger, RLOG_LV_FATAL, "PULL_RESULT", MESA_handle_runtime_log(g_tsg_para.logger, RLOG_LV_DEBUG, "PULL_RESULT",
"pull policy failed, result_type=%d, addr: %s", "pull policy failed, Not hit, label is %s addr: %s",
(label==NULL) ? -1 : label->result_type, (label==NULL) ? "NULL" : label->domain,
printaddr(&a_stream->addr, a_stream->threadnum)); printaddr(&a_stream->addr, a_stream->threadnum));
} }