#include<android/log.h>
#define TAG ""

#define LOGD(...). __android_log_print(ANDROID_LOG_DEBUG,TAG ,__VA_ARGS__) // Define the LOGD type
#define LOGI(...). __android_log_print(ANDROID_LOG_INFO,TAG ,__VA_ARGS__) // Define the LOGI type
#define LOGW(...). __android_log_print(ANDROID_LOG_WARN,TAG ,__VA_ARGS__) // Define the LOGW type
#define LOGE(...). __android_log_print(ANDROID_LOG_ERROR,TAG ,__VA_ARGS__) // Define the LOGE type
#define LOGF(...). __android_log_print(ANDROID_LOG_FATAL,TAG ,__VA_ARGS__) // Define the LOGF type
#define NELEM(x) ((int) (sizeof(x) / sizeof((x)[0])))


#define FIND_CLASS(var, className) \
var = env->FindClass(className); \
if(!var){ \
 LOGE("could not find class %s",className); The \} #define GET_METHOD_ID(var, clazz, methodName, descriptor) \
var = env->GetMethodID(clazz, methodName, descriptor); \
if(!var){ \
 LOGE("unabele to find field %s",methodName); The \} #define GET_FIELD_ID(var ,clazz, fieldName, SIG) \
var =  env->GetFieldID(clzzz,fieldName,SIG); \
if(!var){ \
 LOGE("unabele to find field %s",fieldName); The \}Copy the code