You can use the Android logging facilities:
#include <android/log.h>
#define APPNAME "MyApp"
__android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "The value of 1 + 1 is %d", 1+1);
Make sure you also link against the logging library, in your Android.mk file:
LOCAL_LDLIBS := -llog
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…