Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e4e4dff17 |
@@ -173,7 +173,6 @@ void *MESA_create_runtime_log_handle(const char *file_path, int level)
|
|||||||
|
|
||||||
char handle_name[MAX_HANDLE_LOG_PATH];
|
char handle_name[MAX_HANDLE_LOG_PATH];
|
||||||
char *p_path_end = rindex(file_path, '/');
|
char *p_path_end = rindex(file_path, '/');
|
||||||
|
|
||||||
char *p_name = p_path_end+1;
|
char *p_name = p_path_end+1;
|
||||||
|
|
||||||
strcpy(handle_name, file_path);
|
strcpy(handle_name, file_path);
|
||||||
@@ -181,10 +180,12 @@ void *MESA_create_runtime_log_handle(const char *file_path, int level)
|
|||||||
p_name = handle_name;
|
p_name = handle_name;
|
||||||
|
|
||||||
|
|
||||||
|
if(p_path_end != NULL && p_path_end > file_path)
|
||||||
|
{
|
||||||
//creating file_path failed, return NULL
|
//creating file_path failed, return NULL
|
||||||
if (create_path(file_path, p_path_end - file_path) < 0)
|
if (create_path(file_path, p_path_end-file_path) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
snapshot_handle_info(p_name, file_path, level);
|
snapshot_handle_info(p_name, file_path, level);
|
||||||
zlog_reload(NULL);
|
zlog_reload(NULL);
|
||||||
zc = zlog_get_category(p_name);
|
zc = zlog_get_category(p_name);
|
||||||
|
|||||||
Reference in New Issue
Block a user