TSG-304 tfe日志中增加common_sub_action字段
1)更新配置文件tfe.conf,kni域 2)更新table_info关键字表名
This commit is contained in:
@@ -191,6 +191,8 @@ int pangu_send_log(struct pangu_logger* handle, const struct pangu_log* log_msg)
|
||||
|
||||
const char *app_proto[]= {"unkonw","http1", "http2"};
|
||||
|
||||
const char *clue_action_map[]= {"redirect","block","replace","hijack","insert"};
|
||||
|
||||
struct json_spec req_fields[]={ {"http_cookie", TFE_HTTP_COOKIE},
|
||||
{"http_referer", TFE_HTTP_REFERER},
|
||||
{"http_user_agent", TFE_HTTP_USER_AGENT} };
|
||||
@@ -347,6 +349,10 @@ int pangu_send_log(struct pangu_logger* handle, const struct pangu_log* log_msg)
|
||||
cJSON_AddNumberToObject(per_hit_obj, "common_policy_id", log_msg->result[i].config_id);
|
||||
cJSON_AddNumberToObject(per_hit_obj, "common_service", log_msg->result[i].service_id);
|
||||
cJSON_AddNumberToObject(per_hit_obj, "common_action", (unsigned char)log_msg->result[i].action);
|
||||
if(log_msg->action<5)
|
||||
{
|
||||
cJSON_AddStringToObject(per_hit_obj, "common_sub_action", clue_action_map[log_msg->action]);
|
||||
}
|
||||
log_payload = cJSON_PrintUnformatted(per_hit_obj);
|
||||
|
||||
TFE_LOG_DEBUG(handle->local_logger, "%s", log_payload);
|
||||
|
||||
Reference in New Issue
Block a user