diff --git a/bin/tsg_log_field.conf b/bin/tsg_log_field.conf index a0dba78..f7a3d69 100644 --- a/bin/tsg_log_field.conf +++ b/bin/tsg_log_field.conf @@ -115,7 +115,8 @@ STRING app_extra_info 102 STRING http_request_body 103 STRING http_response_body 104 STRING mail_eml_file 105 -STRING common_vsys_id 106 +LONG common_vsys_id 106 STRING dtls_sni 107 -STRING common_tunnel_endpoint_a_desc 108 -STRING common_tunnel_endpoint_b_desc 109 \ No newline at end of file +STRING common_tunnel_endpoint_a_desc 108 +STRING common_tunnel_endpoint_b_desc 109 +LONG common_t_vsys_id 110 \ No newline at end of file diff --git a/src/tsg_send_log.cpp b/src/tsg_send_log.cpp index 585ec5c..55ce72b 100644 --- a/src/tsg_send_log.cpp +++ b/src/tsg_send_log.cpp @@ -1471,6 +1471,10 @@ static int set_xxxx_from_user_region(struct TLD_handle_t *_handle, struct tsg_lo cJSON *object=NULL; char *user_region=NULL; + TLD_delete(_handle, _instance->id2field[LOG_COMMON_USER_REGION].name); + TLD_delete(_handle, _instance->id2field[LOG_COMMON_VSYSTEM_ID].name); + TLD_delete(_handle, _instance->id2field[LOG_COMMON_SUB_ACTION].name); + if(p_result->action!=TSG_ACTION_NONE && p_result->serv_def_len>0) { user_region=(char *)dictator_malloc(thread_seq, p_result->serv_def_len+1); @@ -2090,7 +2094,9 @@ int tsg_send_log(struct tsg_log_instance_t *instance, struct TLD_handle_t *handl { TLD_append(_handle, _instance->id2field[LOG_COMMON_DEVICE_TAG].name, (void *)(g_tsg_para.device_tag), TLD_TYPE_STRING); } - + + TLD_append(_handle, _instance->id2field[LOG_COMMON_TRAFFIC_VSYSTEM_ID].name, (void *)(long)_instance->vsystem_id, TLD_TYPE_LONG); + set_application_behavior(_instance, _handle, log_msg->a_stream); for(i=0;iresult_num; i++) @@ -2179,7 +2185,6 @@ int tsg_send_log(struct tsg_log_instance_t *instance, struct TLD_handle_t *handl TLD_delete(_handle, _instance->id2field[LOG_COMMON_SERVICE].name); TLD_delete(_handle, _instance->id2field[LOG_COMMON_ACTION].name); TLD_delete(_handle, _instance->id2field[LOG_COMMON_USER_REGION].name); - TLD_delete(_handle, _instance->id2field[LOG_COMMON_SUB_ACTION].name); } TLD_cancel(handle); diff --git a/src/tsg_send_log_internal.h b/src/tsg_send_log_internal.h index 7c7d604..ded9fa3 100644 --- a/src/tsg_send_log_internal.h +++ b/src/tsg_send_log_internal.h @@ -129,6 +129,7 @@ typedef enum _tsg_log_field_id LOG_DTLS_SNI, LOG_COMMON_TUNNELS_ENDPOINT_A_DESC, LOG_COMMON_TUNNELS_ENDPOINT_B_DESC, + LOG_COMMON_TRAFFIC_VSYSTEM_ID, LOG_COMMON_MAX }tsg_log_field_id_t;