#define LOGE(fmt, ...) do { \
char *buf = (char*)malloc(1024); \
if (buf) { \
char *file; \
memset(buf, 0, 1024); \
file = (char*)strrchr(__FILE__, '/'); \
if(!file) { \
file = (char*)strrchr(__FILE__, '\\'); \
} \
snprintf(buf, 1023, "[tid:%d fn:%s ln:%d %s] ", (int)pthread_self(), __FUNCTION__, __LINE__, (NULL != file) ? (file + 1) : __FILE__); \
snprintf(buf + strlen(buf), 1023 - strlen(buf), fmt, ##__VA_ARGS__); \
//printf("%s\n", buf); \ <----------奇怪编译报错!
printf("%s\n", buf); \
free(buf);\
} \
} while(0);