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

18
src/log/log_private.h Normal file
View File

@@ -0,0 +1,18 @@
#pragma once
#ifdef __cplusplus
extern "C"
{
#endif
#include "stellar/log.h"
extern thread_local struct logger *__thread_local_logger;
struct logger *log_new(const char *config_file);
void log_free(struct logger *logger);
void log_level_reload(struct logger *logger);
#ifdef __cplusplus
}
#endif