Logging values with C++ in Android NDK
String str = "Just an example";
NativeLibrary.logError(str);
NativeLibrary.logWarn(str);
NativeLibrary.logDebug(str);
NativeLibrary.logInfo(str);
E/TAG: Just an example
W/TAG: Just an example
D/TAG: Just an example
I/TAG: Just an example
#define LOG_TAG "TAG"
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN,LOG_TAG,__VA_ARGS__)
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)