refactor: move macro to utils.h

This commit is contained in:
luwenpeng
2024-08-16 10:43:00 +08:00
parent bfa5564558
commit 6fbce43afc
12 changed files with 31 additions and 40 deletions

View File

@@ -26,6 +26,12 @@
#define STELLAR_LOG_ERROR(format, ...) LOG_ERROR("stellar", format, ##__VA_ARGS__)
#define STELLAR_LOG_DEBUG(format, ...) LOG_DEBUG("stellar", format, ##__VA_ARGS__)
#ifdef STELLAR_GIT_VERSION
static __attribute__((__used__)) const char *version = STELLAR_GIT_VERSION;
#else
static __attribute__((__used__)) const char *version = "Unknown";
#endif
struct schedule_data
{
uint64_t last_free_expired_session_timestamp;
@@ -493,7 +499,7 @@ int stellar_run(int argc __attribute__((unused)), char **argv __attribute__((unu
STELLAR_LOG_ERROR("unable to init log");
goto error_out;
}
STELLAR_LOG_STATE("start stellar (version: %s)\n %s", __stellar_version, logo_str);
STELLAR_LOG_STATE("start stellar (version: %s)\n %s", version, logo_str);
STELLAR_LOG_STATE("log config file : %s", log_config_file);
STELLAR_LOG_STATE("main config file : %s", main_config_file);
STELLAR_LOG_STATE("plugin config file : %s", plugin_config_file);