diff options
Diffstat (limited to 'plugin/business/doh/src/logger.cpp')
| -rw-r--r-- | plugin/business/doh/src/logger.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/plugin/business/doh/src/logger.cpp b/plugin/business/doh/src/logger.cpp index ae0ddf5..f11335c 100644 --- a/plugin/business/doh/src/logger.cpp +++ b/plugin/business/doh/src/logger.cpp @@ -8,20 +8,6 @@ struct json_spec enum tfe_http_std_field field_id; }; -enum _log_action //Bigger action number is prior. -{ - LG_ACTION_NONE = 0x00, - LG_ACTION_MONIT = 0x01, - LG_ACTION_FORWARD = 0x02, /* N/A */ - LG_ACTION_REJECT = 0x10, - LG_ACTION_DROP = 0x20, /* N/A */ - LG_ACTION_MANIPULATE = 0x30, - LG_ACTION_RATELIMIT = 0x40, /* N/A */ - LG_ACTION_WHITELIST = 0x60, - LG_ACTION_SHUNT = 0x80, - __LG_ACTION_MAX -}; - #define get_time_ms(tv) ((long long)(tv.tv_sec) * 1000 + (long long)(tv.tv_usec) / 1000) static int get_rr_str2json(cJSON *object, dns_info_t *dns_info, int *dns_sec) @@ -473,9 +459,9 @@ int doh_send_log(struct doh_conf *handle, const struct tfe_http_session *http, c for (size_t i = 0; i < result_num; i++) { - TFE_LOG_DEBUG(handle->local_logger, "URL: %s, policy_id: %lld, service: %d, do_log:%d", + TFE_LOG_DEBUG(handle->local_logger, "URL: %s, policy_id: %s, service: %d, do_log:%d", http->req->req_spec.url, - result[i].config_id, + result[i].config_uuid_string, result[i].service_id, result[i].do_log); @@ -485,11 +471,11 @@ int doh_send_log(struct doh_conf *handle, const struct tfe_http_session *http, c } cJSON *proxy_rule_list=NULL; - int config_id[1]={0}; + char *config_id[1]={0}; per_hit_obj = cJSON_Duplicate(common_obj, 1); - config_id[0]=result[i].config_id; - proxy_rule_list = cJSON_CreateIntArray(config_id, 1); + config_id[0]=result[i].config_uuid_string; + proxy_rule_list = cJSON_CreateStringArray((const char **)config_id, 1); cJSON_AddItemToObject(per_hit_obj, "proxy_rule_list", proxy_rule_list); cJSON_AddStringToObject(per_hit_obj, "proxy_action", "redirect"); |
