I set up logging with C++ in Android NDK.
I can print a message to logcat like this:
__android_log_write(ANDROID_LOG_INFO, \"tag here\", \"mess
You could use __android_log_print which uses a sprintf-like syntax that formats your data into a string.
__android_log_print
sprintf
__android_log_print(ANDROID_LOG_INFO, "sometag", "test int = %d", testInt);