export the logging API symbol
This commit is contained in:
@@ -29,6 +29,7 @@ struct dumpfile_io
|
||||
char dumpfile_path[256];
|
||||
|
||||
pcap_t *pcap;
|
||||
struct logger *logger;
|
||||
struct packet_queue *queue[MAX_THREAD_NUM];
|
||||
struct packet_io_stat stat[MAX_THREAD_NUM];
|
||||
uint64_t io_thread_need_exit;
|
||||
@@ -210,6 +211,7 @@ static int all_packet_processed(struct dumpfile_io *handle)
|
||||
static void *dumpfile_thread(void *arg)
|
||||
{
|
||||
struct dumpfile_io *handle = (struct dumpfile_io *)arg;
|
||||
__thread_local_logger = handle->logger;
|
||||
|
||||
ATOMIC_SET(&handle->io_thread_is_runing, 1);
|
||||
PACKET_IO_LOG_FATAL("dumpfile io thread is running");
|
||||
@@ -292,6 +294,7 @@ struct dumpfile_io *dumpfile_io_new(const char *dumpfile_path, enum packet_io_mo
|
||||
|
||||
handle->mode = mode;
|
||||
handle->nr_threads = nr_threads;
|
||||
handle->logger = __thread_local_logger;
|
||||
strncpy(handle->dumpfile_path, dumpfile_path, MIN(strlen(dumpfile_path), sizeof(handle->dumpfile_path)));
|
||||
|
||||
for (uint16_t i = 0; i < handle->nr_threads; i++)
|
||||
|
||||
Reference in New Issue
Block a user