Compare commits
2 Commits
v2.0.3-tes
...
v2.0.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e4e4dff17 | ||
|
|
150255033c |
@@ -40,6 +40,7 @@ add_library(${lib_name}_shared SHARED src/MESA_handle_logger.c)
|
||||
target_link_libraries(${lib_name}_shared zlog_static)
|
||||
set_target_properties(${lib_name}_shared PROPERTIES LINK_FLAGS
|
||||
"-Wl,--version-script=${PROJECT_SOURCE_DIR}/src/version.map")
|
||||
target_link_libraries(${lib_name}_shared pthread)
|
||||
|
||||
if(DEFINED MESA_SHARED_INSTALL_DIR)
|
||||
set_target_properties(${lib_name}_shared PROPERTIES OUTPUT_NAME ${lib_name} LIBRARY_OUTPUT_DIRECTORY ${MESA_SHARED_INSTALL_DIR})
|
||||
@@ -65,6 +66,6 @@ install(FILES inc/MESA_handle_logger.h DESTINATION ${CMAKE_INSTALL_PREFIX}/inc
|
||||
|
||||
|
||||
add_executable(${lib_name}_demo demo/test_handle_logger.c)
|
||||
target_link_libraries(${lib_name}_demo rt pthread ${lib_name}_shared)
|
||||
target_link_libraries(${lib_name}_demo pthread ${lib_name}_shared)
|
||||
|
||||
include(Package)
|
||||
|
||||
@@ -173,7 +173,6 @@ void *MESA_create_runtime_log_handle(const char *file_path, int level)
|
||||
|
||||
char handle_name[MAX_HANDLE_LOG_PATH];
|
||||
char *p_path_end = rindex(file_path, '/');
|
||||
|
||||
char *p_name = p_path_end+1;
|
||||
|
||||
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;
|
||||
|
||||
|
||||
if(p_path_end != NULL && p_path_end > file_path)
|
||||
{
|
||||
//creating file_path failed, return NULL
|
||||
if (create_path(file_path, p_path_end-file_path) < 0)
|
||||
return NULL;
|
||||
|
||||
}
|
||||
snapshot_handle_info(p_name, file_path, level);
|
||||
zlog_reload(NULL);
|
||||
zc = zlog_get_category(p_name);
|
||||
|
||||
Reference in New Issue
Block a user