diff options
| author | lishu <[email protected]> | 2018-11-12 10:59:03 +0800 |
|---|---|---|
| committer | lishu <[email protected]> | 2018-11-12 10:59:03 +0800 |
| commit | 69965fc7d12a4e77d758c9e83232f9fbdab6e634 (patch) | |
| tree | 2a6ee861aecda4b164034a99766108a9c515ef6b /src | |
碎片化前端插件 外网
Diffstat (limited to 'src')
| -rw-r--r-- | src/support/MESA_trace/src/inc/MESA_handle_logger.h | 68 | ||||
| -rw-r--r-- | src/support/MESA_trace/src/lib/libMESA_trace.a | bin | 0 -> 24724 bytes | |||
| -rw-r--r-- | src/support/MESA_trace/src/lib/libMESA_trace.so | bin | 0 -> 22720 bytes |
3 files changed, 68 insertions, 0 deletions
diff --git a/src/support/MESA_trace/src/inc/MESA_handle_logger.h b/src/support/MESA_trace/src/inc/MESA_handle_logger.h new file mode 100644 index 0000000..c615b53 --- /dev/null +++ b/src/support/MESA_trace/src/inc/MESA_handle_logger.h @@ -0,0 +1,68 @@ +#ifndef MESA_HANDLE__LOGGER_H +#define MESA_HANDLE__LOGGER_H + +/* + * runtime_log with handle, + * based on runtime_log. + * yang wei + * create time:2014-03-24 + * version:20140324 + */ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#define RLOG_LV_DEBUG 10 +#define RLOG_LV_INFO 20 +#define RLOG_LV_FATAL 30 + + +#define MESA_HANDLE_RUNTIME_LOG(handle, lv, mod, fmt, args...) \ + MESA_handle_runtime_log((handle), (lv), (mod), "file %s, line %d, " fmt, \ + __FILE__, __LINE__, ##args) + +/* + * name: MESA_create_runtime_log_handle + * functionality: get runtime_log handle; + * params: + * file_path: path of log file, like "./log/runtime_log"; + * level: level of log; + * returns: + * not NULL, if succeeded; + * NULL, if file is not absolute path, or failed to create log file; + */ +void *MESA_create_runtime_log_handle(const char *file_path, int level); + +/* + * name: MESA_handle_runtime_log + * functionality: appends log message to runtime log file; + * params: + * handle:handle of runtime log, which is created by MESA_create_runtime_log_handle; + * level: log level, messages with level value smaller the global var + * "runtime_log_level" are ignored; + * module: name of loggin module; + * fmt: format string; + * returns: + * none; + */ +void MESA_handle_runtime_log(void *handle, int level, const char *module, const char *fmt, ...); + +/* + * name: MESA_destroy_runtime_log_handle + * functionality: release runtime log handle memory. + * params: + * handle: runtime log handle which is going to be released; + * returns: + * none; + */ +void MESA_destroy_runtime_log_handle(void *handle); + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/src/support/MESA_trace/src/lib/libMESA_trace.a b/src/support/MESA_trace/src/lib/libMESA_trace.a Binary files differnew file mode 100644 index 0000000..0f89b81 --- /dev/null +++ b/src/support/MESA_trace/src/lib/libMESA_trace.a diff --git a/src/support/MESA_trace/src/lib/libMESA_trace.so b/src/support/MESA_trace/src/lib/libMESA_trace.so Binary files differnew file mode 100644 index 0000000..a1aa873 --- /dev/null +++ b/src/support/MESA_trace/src/lib/libMESA_trace.so |
