OCT 1. 启动时判断log配置文件是否存在,并打印提示信息
This commit is contained in:
parent
c4c3b5bf81
commit
bf05af5140
|
@ -76,12 +76,16 @@ int user_init(const char *pAppCfgFile, const char *pCfgDirectory, const char *pK
|
|||
utstring_new(pPath);
|
||||
utstring_printf(pPath, "%s/%s", bufCfgDir, "zlog.conf");
|
||||
|
||||
if ((ret = dzlog_init(utstring_body(pPath), get_cur_process_name())) != ERR_SUCCESS) {
|
||||
printf("Zlog configure file [%s] init result: %d+++++\n", utstring_body(pPath), ret);
|
||||
zlog_profile();
|
||||
return -ERR_ZLOG_INIT;
|
||||
if (file_exists(utstring_body(pPath))) {
|
||||
if ((ret = dzlog_init(utstring_body(pPath), get_cur_process_name())) != ERR_SUCCESS) {
|
||||
printf("Zlog configure file [%s] init result: %d+++++\n", utstring_body(pPath), ret);
|
||||
zlog_profile();
|
||||
return -ERR_ZLOG_INIT;
|
||||
} else {
|
||||
dzlog_info("Zlog used configure file [%s]\n", utstring_body(pPath));
|
||||
}
|
||||
} else {
|
||||
dzlog_info("Zlog used configure file [%s]\n", utstring_body(pPath));
|
||||
printf("Zlog configure file [%s] not found, Zlog system not work+++++\n", utstring_body(pPath));
|
||||
}
|
||||
|
||||
zlog_level_switch(zlog_get_category(get_cur_process_name()),
|
||||
|
|
Loading…
Reference in New Issue