✨ feat(MESA_handle_runtime_log_level_enabled): log_handle_t改为前置声明,增加判断level是否启用的接口
This commit is contained in:
@@ -19,6 +19,8 @@ extern "C"
|
||||
#define RLOG_LV_FATAL 30
|
||||
|
||||
|
||||
struct log_handle_t;
|
||||
|
||||
int MESA_handle_runtime_log_creation(const char *conf_path);
|
||||
int MESA_handle_runtime_log_reconstruction(const char *conf_path);
|
||||
void MESA_handle_runtime_log_destruction();
|
||||
@@ -27,6 +29,8 @@ void MESA_handle_runtime_log_destruction();
|
||||
MESA_handle_runtime_log((handle), (lv), (mod), "file %s, line %d, " fmt, \
|
||||
__FILE__, __LINE__, ##args)
|
||||
|
||||
|
||||
int MESA_handle_runtime_log_level_enabled(struct log_handle_t *handle, const int level);
|
||||
/*
|
||||
* name: MESA_create_runtime_log_handle
|
||||
* functionality: get runtime_log handle;
|
||||
@@ -37,7 +41,7 @@ void MESA_handle_runtime_log_destruction();
|
||||
* 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);
|
||||
struct log_handle_t *MESA_create_runtime_log_handle(const char *file_path, int level);
|
||||
|
||||
/*
|
||||
* name: MESA_handle_runtime_log
|
||||
@@ -51,7 +55,7 @@ void MESA_handle_runtime_log_destruction();
|
||||
* returns:
|
||||
* none;
|
||||
*/
|
||||
void MESA_handle_runtime_log(void *handle, int level, const char *module, const char *fmt, ...);
|
||||
void MESA_handle_runtime_log(struct log_handle_t *handle, int level, const char *module, const char *fmt, ...);
|
||||
|
||||
/*
|
||||
* name: MESA_destroy_runtime_log_handle
|
||||
@@ -61,7 +65,7 @@ void MESA_handle_runtime_log(void *handle, int level, const char *module, const
|
||||
* returns:
|
||||
* none;
|
||||
*/
|
||||
void MESA_destroy_runtime_log_handle(void *handle);
|
||||
void MESA_destroy_runtime_log_handle(struct log_handle_t *handle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user