2019-07-28 10:31:56 +08:00
|
|
|
|
#ifndef ACL_DEBUG_INCLUDE_H
|
2014-11-19 00:25:21 +08:00
|
|
|
|
#define ACL_DEBUG_INCLUDE_H
|
|
|
|
|
|
|
|
|
|
#include "acl_define.h"
|
|
|
|
|
#include "acl_msg.h"
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-07-28 10:31:56 +08:00
|
|
|
|
#define ACL_DEBUG_INTER_BASE 0 /**< <20><>С<EFBFBD><D0A1><EFBFBD>Ա<EFBFBD>ǩֵ */
|
|
|
|
|
#define ACL_DEBUG_WQ (ACL_DEBUG_INTER_BASE + 1) /**< ACL_WORKQ <20><><EFBFBD>Ա<EFBFBD>ǩ */
|
|
|
|
|
#define ACL_DEBUG_PROCTL (ACL_DEBUG_INTER_BASE + 2) /**< ACL_PROCTL <20><><EFBFBD>Ա<EFBFBD>ǩ */
|
|
|
|
|
#define ACL_DEBUG_THR_POOL (ACL_DEBUG_INTER_BASE + 3) /**< ACL_PTHREAD_POOL <20><><EFBFBD>Ա<EFBFBD>ǩ */
|
|
|
|
|
#define ACL_DEBUG_EVENT (ACL_DEBUG_INTER_BASE + 4) /**< ACL_EVENT <20><><EFBFBD>ȱ<EFBFBD>ǩ */
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD>Ժ<EFBFBD><EFBFBD>ӿ<EFBFBD>
|
|
|
|
|
* @param SECTION {int} <EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD>ǩֵ
|
|
|
|
|
* @param LEVEL {int} <EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD>SECTION<EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD>ǩ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
#define acl_debug(SECTION, LEVEL) \
|
|
|
|
|
!acl_do_debug((SECTION), (LEVEL)) ? (void) 0 : acl_msg_info
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD>ͷ<EFBFBD><EFBFBD>ڲ<EFBFBD>һЩ<EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_debug_end(void);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><EFBFBD>ýӿ<EFBFBD>
|
|
|
|
|
* @param ptr {const char*} <EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* <EFBFBD><EFBFBD>ʽ: 1:1, 2:10, 3:8... or 1:1; 2:10; 3:8...
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_debug_init(const char *ptr);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><EFBFBD>ýӿ<EFBFBD>
|
|
|
|
|
* @param ptr {const char*} <EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* <EFBFBD><EFBFBD>ʽ: 1:1, 2:10, 3:8... or 1:1; 2:10; 3:8...
|
|
|
|
|
* @param max_debug_level {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD>ǩֵ
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_debug_init2(const char *ptr, int max_debug_level);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD>жϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ<EFBFBD><EFBFBD>
|
|
|
|
|
* @param section {int} <EFBFBD><EFBFBD>ǩֵ
|
|
|
|
|
* @param level {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API int acl_do_debug(int section, int level);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|