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

@@ -2,12 +2,12 @@
#include <stdlib.h>
#include <string.h>
#include "log.h"
#include "toml.h"
#include "log_private.h"
#include "stellar_config.h"
#define CONFIG_LOG_ERROR(format, ...) LOG_ERROR("config", format, ##__VA_ARGS__)
#define CONFIG_LOG_DEBUG(format, ...) LOG_DEBUG("config", format, ##__VA_ARGS__)
#define CONFIG_LOG_ERROR(format, ...) STELLAR_LOG_ERROR(__thread_local_logger, "config", format, ##__VA_ARGS__)
#define CONFIG_LOG_DEBUG(format, ...) STELLAR_LOG_DEBUG(__thread_local_logger, "config", format, ##__VA_ARGS__)
// return 0: success
// retuun -1: failed