2013-08-18 17:42:25 +08:00
|
|
|
|
#ifndef __ACL_DEBUG_INCLUDE_H__
|
|
|
|
|
#define __ACL_DEBUG_INCLUDE_H__
|
|
|
|
|
|
|
|
|
|
#include "acl_define.h"
|
|
|
|
|
#include "acl_msg.h"
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#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>ǩ */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <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>
|
|
|
|
|
*/
|
|
|
|
|
#define acl_debug(SECTION, LEVEL) \
|
|
|
|
|
!acl_do_debug((SECTION), (LEVEL)) ? (void) 0 : acl_msg_info
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD>ͷ<EFBFBD><EFBFBD>ڲ<EFBFBD>һЩ<EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ
|
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_debug_end(void);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><EFBFBD>ýӿ<EFBFBD>
|
2013-11-05 22:23:23 +08:00
|
|
|
|
* @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...
|
2013-08-18 17:42:25 +08:00
|
|
|
|
*/
|
2013-11-05 22:23:23 +08:00
|
|
|
|
ACL_API void acl_debug_init(const char *ptr);
|
2013-08-18 17:42:25 +08:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><EFBFBD>ýӿ<EFBFBD>
|
2013-11-05 22:23:23 +08:00
|
|
|
|
* @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...
|
2013-08-18 17:42:25 +08:00
|
|
|
|
* @param max_debug_level {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD>ǩֵ
|
|
|
|
|
*/
|
2013-11-05 22:23:23 +08:00
|
|
|
|
ACL_API void acl_debug_init2(const char *ptr, int max_debug_level);
|
2013-08-18 17:42:25 +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>ֵ
|
|
|
|
|
*/
|
|
|
|
|
ACL_API int acl_do_debug(int section, int level);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|