修复编译错误
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
#include <MESA/MESA_prof_load.h>
|
||||
#include <MESA/MESA_handle_logger.h>
|
||||
|
||||
#include "tsg_types.h"
|
||||
#include "tsg_send_log.h"
|
||||
#include "tsg_send_log_internal.h"
|
||||
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
#include <MESA/rdkafka.h>
|
||||
#include <MESA/cJSON.h>
|
||||
|
||||
#include "tsg_types.h"
|
||||
|
||||
|
||||
#define MAX_IPV4_LEN 16
|
||||
#define MAX_STRING_LEN 32
|
||||
|
||||
@@ -23,32 +20,6 @@ enum _DO_LOG
|
||||
LOG_ALL=2
|
||||
};
|
||||
|
||||
typedef struct _id2field
|
||||
{
|
||||
TLD_TYPE type;
|
||||
int id;
|
||||
char name[MAX_STRING_LEN];
|
||||
}id2field_t;
|
||||
|
||||
struct _tld_handle
|
||||
{
|
||||
int thread_id;
|
||||
cJSON *object;
|
||||
};
|
||||
|
||||
struct _tsg_log_instance
|
||||
{
|
||||
int mode;
|
||||
int max_service;
|
||||
void *logger;
|
||||
char common_field_file[MAX_STRING_LEN*4];
|
||||
char broker_list[MAX_STRING_LEN*4];
|
||||
char local_ip_str[MAX_IPV4_LEN];
|
||||
id2field_t id2field[LOG_COMMON_MAX];
|
||||
rd_kafka_topic_t **topic_rkt;
|
||||
id2field_t *service2topic;
|
||||
};
|
||||
|
||||
typedef enum _tsg_log_field_id
|
||||
{
|
||||
LOG_COMMON_SERVICE,
|
||||
@@ -90,6 +61,31 @@ typedef enum _tsg_log_field_id
|
||||
LOG_COMMON_MAX
|
||||
}tsg_log_field_id_t;
|
||||
|
||||
typedef struct _id2field
|
||||
{
|
||||
TLD_TYPE type;
|
||||
int id;
|
||||
char name[MAX_STRING_LEN];
|
||||
}id2field_t;
|
||||
|
||||
struct _tld_handle
|
||||
{
|
||||
int thread_id;
|
||||
cJSON *object;
|
||||
};
|
||||
|
||||
struct _tsg_log_instance
|
||||
{
|
||||
int mode;
|
||||
int max_service;
|
||||
void *logger;
|
||||
char common_field_file[MAX_STRING_LEN*4];
|
||||
char broker_list[MAX_STRING_LEN*4];
|
||||
char local_ip_str[MAX_IPV4_LEN];
|
||||
id2field_t id2field[LOG_COMMON_MAX];
|
||||
rd_kafka_topic_t **topic_rkt;
|
||||
id2field_t *service2topic;
|
||||
};
|
||||
|
||||
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