cutil-log.h

来自「Linux环境下常用功能的实现」· C头文件 代码 · 共 37 行

H
37
字号
#ifndef __CUTIL_LOG_H__#define __CUTIL_LOG_H__#ifdef __cplusplusextern "C"{#endif#define CUTIL_LOG_DEBUG	0#define CUTIL_LOG_ERROR	1#define CUTIL_LOG_TRANS	2void cutil_log_print(int nLogLevel, char *pszFile, 					int nLine, char *pszFmt, ...);void cutil_log_print_hex(int nLogLevel, char *pszFile, 					int nLine, char *pszBuffer, int nLen);void cutil_log_set_debug(int bIfDebug);#define cutil_log_debug(format...) \	cutil_log_print(CUTIL_LOG_DEBUG, __FILE__, __LINE__, format);#define cutil_log_error(format...) \	cutil_log_print(CUTIL_LOG_ERROR, __FILE__, __LINE__, format);#define cutil_log_trans(format...) \	cutil_log_print(CUTIL_LOG_TRANS, __FILE__, __LINE__, format);#define cutil_log_debug_hex(str, len) \	cutil_log_print_hex(CUTIL_LOG_DEBUG, __FILE__, __LINE__, str, len);#define cutil_log_error_hex(str, len) \	cutil_log_print_hex(CUTIL_LOG_ERROR, __FILE__, __LINE__, str, len);#define cutil_log_trans_hex(str, len) \	cutil_log_print_hex(CUTIL_LOG_TRANS, __FILE__, __LINE__, str, len);#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?