#define LogDebug(x...) do { \
if (g_bUseLog && _debug_ >= g_log_level) { \
char buf[MAX_LOG_BUF_SIZE] = {0}; \
snprintf(buf, MAX_LOG_BUF_SIZE, x); \
__android_log_print(ANDROID_LOG_DEBUG, g_tag_vod.c_str(), "%s in %s:%i", buf, __FUNCTION__, __LINE__); \
} \
} while (0);
#define LogInfo(x...) do { \
if (g_bUseLog && _info_ >= g_log_level) { \
char buf[MAX_LOG_BUF_SIZE] = {0}; \
snprintf(buf, MAX_LOG_BUF_SIZE, x); \
__android_log_print(ANDROID_LOG_INFO, g_tag_vod.c_str(), "%s in %s:%i", buf, __FUNCTION__, __LINE__); \
} \
} while (0);
#define LogWarning(x...) do { \
if (g_bUseLog && _warning_ >= g_log_level) { \
char buf[MAX_LOG_BUF_SIZE] = {0}; \
snprintf(buf, MAX_LOG_BUF_SIZE, x); \
__android_log_print(ANDROID_LOG_WARN, g_tag_vod.c_str(), "%s in %s:%i", buf, __FUNCTION__, __LINE__); \
} \
} while (0);
#define LogError(x...) do { \
if (g_bUseLog && _error_ >= g_log_level) { \
char buf[MAX_LOG_BUF_SIZE] = {0}; \
snprintf(buf, MAX_LOG_BUF_SIZE, x); \
__android_log_print(ANDROID_LOG_ERROR, g_tag_vod.c_str(), "%s in %s:%i", buf, __FUNCTION__, __LINE__); \
} \
} while (0);
Android Log
于 2022-08-16 09:37:35 首次发布