修改日志逻辑,增加时间周期和周期内打印条数设置

This commit is contained in:
wangmenglan
2022-01-20 11:06:36 +08:00
parent ff694442c0
commit d5de7fa545
3 changed files with 106 additions and 46 deletions

View File

@@ -63,6 +63,18 @@ void MESA_handle_runtime_log(void *handle, int level, const char *module, const
*/
void MESA_destroy_runtime_log_handle(void *handle);
/*
* name: MESA_set_handle_ratelimit
* functionality: set not more than @burst in every @interval when appends log message
* params:
* handle: runtime log handle which is going to be released;
* interval: interval time(second). if set '0', it means unlimit.
* burst: in interval time max count
* returns:
* none;
*/
void MESA_set_runtime_log_handle_ratelimit(void *handle, int interval, int burst);
#ifdef __cplusplus
}
#endif