#ifndef _COMM_H_
#define _COMM_H_
#define DEBUG 1
#if DEBUG
#define TAG "yunshouhu"
#include <android/log.h>
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__)
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__)
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN, TAG, __VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__)
#else
#define LOGI(...) while(0){}
#define LOGD(...) while(0){}
#define LOGW(...) while(0){}
#define LOGE(...) while(0){}
#endif
#endif
http://blog.csdn.net/earbao/article/details/51318831