合并头文件,删除无用头文件
This commit is contained in:
@@ -276,7 +276,7 @@ extern "C" int TSG_MASTER_INIT()
|
||||
|
||||
|
||||
|
||||
extern "C" int T2_MASTER_UNLOAD()
|
||||
extern "C" int TSG_MASTER_UNLOAD()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ int tsg_rule_init(const char* conffile, void *logger)
|
||||
{
|
||||
unsigned short redis_port = 0;
|
||||
int ret=0,scan_detail=0,effect_interval=60;
|
||||
const char* instance_name=NULL,*module="MAAT";
|
||||
const char* instance_name="TSG",*module="MAAT";
|
||||
int factor=0, redis_port_num=0,redis_index=0;
|
||||
char redis_ip[16]={0}, effective_flag[1024]={0};
|
||||
int maat_mode=0,maat_stat_on=0,maat_perf_on=0,thread_max=0;
|
||||
@@ -41,6 +41,7 @@ int tsg_rule_init(const char* conffile, void *logger)
|
||||
|
||||
thread_max=get_thread_count();
|
||||
g_tsg_maat_feather=Maat_feather(thread_max, table_info, logger);
|
||||
|
||||
if(maat_mode==2)
|
||||
{
|
||||
MESA_load_profile_string_def(conffile,module,"REDIS_IP", redis_ip, sizeof(redis_ip),"");
|
||||
|
||||
@@ -279,7 +279,7 @@ tsg_log_instance_t tsg_sendlog_init(const char *conffile)
|
||||
MESA_load_profile_string_def(conffile, "TSG_LOG", "COMMON_FIELD_FILE", _instance->common_field_file, sizeof(_instance->common_field_file), NULL);
|
||||
MESA_load_profile_string_def(conffile, "TSG_LOG", "BROKER_LIST", _instance->broker_list, sizeof(_instance->broker_list), NULL);
|
||||
|
||||
MESA_load_profile_int_def(conffile, "TSG_LOG", "LEVEL",&(level), 30);
|
||||
MESA_load_profile_int_def(conffile, "TSG_LOG", "LOG_LEVEL",&(level), 30);
|
||||
MESA_load_profile_string_def(conffile, "TSG_LOG", "LOG_PATH", log_path, sizeof(log_path), NULL);
|
||||
|
||||
_instance->logger=MESA_create_runtime_log_handle(log_path, level);
|
||||
@@ -306,7 +306,7 @@ tsg_log_instance_t tsg_sendlog_init(const char *conffile)
|
||||
|
||||
if(!(kafka_handle=rd_kafka_new(RD_KAFKA_PRODUCER, rdkafka_conf, kafka_errstr, sizeof(kafka_errstr))))
|
||||
{
|
||||
MESA_handle_runtime_log(_instance->logger, RLOG_LV_FATAL, "CABOT_INIT", "rd_kafka_new is error");
|
||||
MESA_handle_runtime_log(_instance->logger, RLOG_LV_FATAL, "KAFKA_INIT", "rd_kafka_new is error");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,47 @@ struct _tsg_log_instance
|
||||
id2field_t *service2topic;
|
||||
};
|
||||
|
||||
typedef enum _tsg_log_field_id
|
||||
{
|
||||
LOG_COMMON_SERVICE,
|
||||
LOG_COMMON_DIRECTION,
|
||||
LOG_COMMON_L4_PROTOCOL,
|
||||
LOG_COMMON_ADDRESS_TYPE,
|
||||
LOG_COMMON_SCHAME_TYPE,
|
||||
LOG_COMMON_POLICY_ID,
|
||||
LOG_COMMON_USER_TAG,
|
||||
LOG_COMMON_ACTION,
|
||||
LOG_COMMON_USER_REGION,
|
||||
LOG_COMMON_CLIENT_IP,
|
||||
LOG_COMMON_CLIENT_PORT,
|
||||
LOG_COMMON_ENTRANCE_ID,
|
||||
LOG_COMMON_DEVICE_ID,
|
||||
LOG_COMMON_LINK_ID,
|
||||
LOG_COMMON_ISP,
|
||||
LOG_COMMON_ENCAPSULATION,
|
||||
LOG_COMMON_SLED_IP,
|
||||
LOG_COMMON_SERVER_IP,
|
||||
LOG_COMMON_SERVER_PORT,
|
||||
LOG_COMMON_APP_LABEL,
|
||||
LOG_COMMON_APP_ID,
|
||||
LOG_COMMON_PROTOCOL_ID,
|
||||
LOG_COMMON_C2S_PKT_NUM,
|
||||
LOG_COMMON_S2C_PKT_NUM,
|
||||
LOG_COMMON_C2S_BYTE_NUM,
|
||||
LOG_COMMON_S2C_BYTE_NUM,
|
||||
LOG_COMMON_START_TIME,
|
||||
LOG_COMMON_END_TIME,
|
||||
LOG_COMMON_CON_DURATION_MS,
|
||||
LOG_COMMON_STREAM_DIR,
|
||||
LOG_COMMON_ADDRESS_LIST,
|
||||
LOG_COMMON_HAS_DUP_TRAFFIC,
|
||||
LOG_COMMON_STREAM_ERROR,
|
||||
LOG_COMMON_STREAM_TRACE_ID,
|
||||
LOG_HTTP_HOST,
|
||||
LOG_SSL_SNI,
|
||||
LOG_COMMON_MAX
|
||||
}tsg_log_field_id_t;
|
||||
|
||||
|
||||
char *log_field_id2name(tsg_log_instance_t instance, tsg_log_field_id_t id);
|
||||
tsg_log_instance_t tsg_sendlog_init(const char *filename);
|
||||
|
||||
Reference in New Issue
Block a user