logger changes from global static variables to one instance per stellar

This commit is contained in:
luwenpeng
2024-08-23 18:44:17 +08:00
parent 8db2e70c38
commit 4e524a8781
23 changed files with 306 additions and 252 deletions

View File

@@ -4,14 +4,14 @@
#include <netinet/ip_icmp.h>
#include <linux/ppp_defs.h>
#include "log.h"
#include "log_private.h"
#include "packet_helper.h"
#include "packet_private.h"
#include "packet_parser.h"
#define PACKET_PARSE_LOG_DEBUG(format, ...) void(0) // LOG_DEBUG("packet parse", format, ##__VA_ARGS__)
#define PACKET_PARSE_LOG_WARN(format, ...) LOG_WARN("packet parse", format, ##__VA_ARGS__)
#define PACKET_PARSE_LOG_ERROR(format, ...) LOG_ERROR("packet parse", format, ##__VA_ARGS__)
#define PACKET_PARSE_LOG_DEBUG(format, ...) void(0) // STELLAR_LOG_DEBUG(__thread_local_logger, "packet parse", format, ##__VA_ARGS__)
#define PACKET_PARSE_LOG_ERROR(format, ...) STELLAR_LOG_ERROR(__thread_local_logger, "packet parse", format, ##__VA_ARGS__)
#define PACKET_PARSE_LOG_WARN(format, ...) STELLAR_LOG_WARN(__thread_local_logger, "packet parse", format, ##__VA_ARGS__)
#define PACKET_LOG_DATA_INSUFFICIENCY(pkt, layer) \
{ \