TSG-14484 Pxoxy支持Maat4
This commit is contained in:
@@ -2,7 +2,7 @@ add_library(common syslogd/src/logging.cpp json/src/arraylist.c json/src/debug.c
|
||||
json/src/json_object.c json/src/json_object_iterator.c json/src/json_tokener.c
|
||||
json/src/json_util.c json/src/libjson.c json/src/linkhash.c
|
||||
json/src/parse_flags.c json/src/printbuf.c json/src/json_checker.c json/src/random_seed.c
|
||||
rt/src/rt_file.cpp rt/src/rt_stdlib.cpp rt/src/rt_string.cpp rt/src/rt_tmr.cpp rt/src/rt_time.cpp)
|
||||
rt/src/rt_stdlib.cpp rt/src/rt_string.cpp rt/src/rt_tmr.cpp rt/src/rt_time.cpp)
|
||||
|
||||
target_include_directories(common PUBLIC syslogd/include json/include rt/include)
|
||||
target_link_libraries(common PUBLIC rt MESA_handle_logger breakpad_mini)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#ifndef __RT_FILE_H__
|
||||
#define __RT_FILE_H__
|
||||
|
||||
extern int rt_file_exsit(const char *);
|
||||
extern int rt_dir_exsit (const char *realpath);
|
||||
|
||||
#endif
|
||||
@@ -1,32 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "rt_common.h"
|
||||
|
||||
int rt_file_exsit(const char *realpath_file)
|
||||
{
|
||||
return (!access(realpath_file, F_OK));
|
||||
}
|
||||
|
||||
int rt_dir_exsit (const char *realpath)
|
||||
{
|
||||
DIR *dir = NULL;
|
||||
int exsit = 0;
|
||||
|
||||
if (unlikely (!realpath))
|
||||
goto finish;
|
||||
|
||||
dir = opendir(realpath);
|
||||
if (!dir) goto finish;
|
||||
|
||||
exsit = 1;
|
||||
closedir(dir);
|
||||
finish:
|
||||
return exsit;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ extern void mesa_logging_print(int log_level, const char *module, const char *ms
|
||||
|
||||
#define mesa_runtime_log(level, module, ...) mesa_log(logging_sc_lid.debug_switch, level, module, __VA_ARGS__)
|
||||
|
||||
void cert_store_syslog_init(const char *config, const char * version);
|
||||
void load_log_module(const char *config, const char * version);
|
||||
void cert_store_log_reconstruction();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,15 +36,12 @@ void cert_store_log_reconstruction()
|
||||
MESA_handle_runtime_log_reconstruction(NULL);
|
||||
}
|
||||
|
||||
void cert_store_syslog_init(const char *config, const char * version)
|
||||
void load_log_module(const char *config, const char * version)
|
||||
{
|
||||
struct breakpad_instance *breakpad;
|
||||
|
||||
MESA_load_profile_int_def(config, (const char *)"SYSTEM",(const char *)"DEBUG_SWITCH",
|
||||
&logging_sc_lid.debug_switch, 1);
|
||||
MESA_load_profile_string_def(config, (const char *)"SYSTEM",(const char *)"RUN_LOG_PATH",
|
||||
logging_sc_lid.run_log_path, 128, "conf/zlog.conf");
|
||||
|
||||
MESA_load_profile_int_def(config, (const char *)"SYSTEM",(const char *)"DEBUG_SWITCH", &logging_sc_lid.debug_switch, 1);
|
||||
MESA_load_profile_string_def(config, (const char *)"SYSTEM",(const char *)"RUN_LOG_PATH", logging_sc_lid.run_log_path, 128, "conf/zlog.conf");
|
||||
if (0 != MESA_handle_runtime_log_creation(logging_sc_lid.run_log_path))
|
||||
{
|
||||
fprintf(stderr, "Create log runtime_log_handle error, init failed\n");
|
||||
|
||||
Reference in New Issue
Block a user