diff options
| -rw-r--r-- | src/MESA_handle_logger.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/MESA_handle_logger.c b/src/MESA_handle_logger.c index 8327124..473361c 100644 --- a/src/MESA_handle_logger.c +++ b/src/MESA_handle_logger.c @@ -235,6 +235,14 @@ int MESA_handle_runtime_log_creation(const char *conf_path) { char *env = getenv("ZLOG_CONF_PATH"); int rc = 0; + + if(g_zlog_inited == 1) + { + rc = zlog_reload(conf_path); + zlog_profile(); + return rc; + } + if (conf_path == NULL || (access(conf_path, R_OK) != 0)) { fprintf(stderr,"[MESA_handle_runtime_log_creation], PATH (%s) unable to access, will output log to STDOUT or Using ZLOG_CONF_PATH (%s) !\n", conf_path, env); @@ -327,4 +335,5 @@ void MESA_handle_runtime_log_destruction() unlink(tmp_conf_filepath); close(g_zlog_conf_fp); } + g_zlog_inited=0; } |
