TSG-18286 Proxy支持虚拟表表名变更,删除代理本地缓存,删除tsg-http相关配置
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
#include <cjson/cJSON.h>
|
||||
#include <MESA/MESA_prof_load.h>
|
||||
#include <tfe_kafka_logger.h>
|
||||
#include <cache_evbase_client.h>
|
||||
#include <tfe_utils.h>
|
||||
#include <tfe_resource.h>
|
||||
|
||||
#include <event2/event.h>
|
||||
#include <event.h>
|
||||
|
||||
#include "mpack.h"
|
||||
#include "tsg_proxy_logger.h"
|
||||
|
||||
@@ -16,7 +18,6 @@ struct json_spec
|
||||
struct proxy_logger
|
||||
{
|
||||
int entry_id;
|
||||
unsigned int en_hoslog;
|
||||
unsigned int en_sendlog;
|
||||
const char *device_id;
|
||||
const char *effective_device_tag;
|
||||
@@ -113,8 +114,6 @@ struct proxy_logger* proxy_log_handle_create(const char* profile, const char* se
|
||||
instance->local_logger=local_logger;
|
||||
|
||||
TFE_LOG_INFO(local_logger,"Tsg-Pxy log is inititating from %s section %s.", profile, section);
|
||||
MESA_load_profile_int_def(profile, section, "ENTRANCE_ID",&(instance->entry_id),0);
|
||||
MESA_load_profile_uint_def(profile, section, "en_hoslog", &instance->en_hoslog, 1);
|
||||
MESA_load_profile_uint_def(profile, section, "en_sendlog", &instance->en_sendlog, 1);
|
||||
TFE_LOG_INFO(local_logger, "Tsg-Pxy sendlog : %s", instance->en_sendlog ? "ENABLE" : "DISABLE");
|
||||
|
||||
@@ -132,16 +131,6 @@ struct proxy_logger* proxy_log_handle_create(const char* profile, const char* se
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
if(instance->en_hoslog==1)
|
||||
{
|
||||
log_file_upload_para=cache_evbase_parameter_new(profile, section, local_logger);
|
||||
if (log_file_upload_para == NULL)
|
||||
{
|
||||
TFE_LOG_ERROR(local_logger, "Tsg-Pxy failed to new cache evbase parameter.");
|
||||
goto error_out;
|
||||
}
|
||||
instance->log_file_upload_instance=cache_evbase_instance_new(log_file_upload_para, local_logger);
|
||||
}
|
||||
return instance;
|
||||
|
||||
error_out:
|
||||
@@ -331,7 +320,6 @@ int proxy_send_log(struct proxy_logger* handle, const struct proxy_log* log_msg)
|
||||
for(size_t i=0; i<log_msg->result_num; i++)
|
||||
{
|
||||
if(log_msg->result[i].do_log!=1) continue;
|
||||
if(handle->en_hoslog!=1) continue;
|
||||
|
||||
if(log_msg->req_body!=NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user