I can\'t get my Nexus S (running Android 4.0) to redirect native stdout message to logcat. I\'ve read that I need to do this:
$ adb shell stop
$ adb shell se
You should also be able to wrap your logging code to detect if it's Android and if so use Android's logging. This may or may not be practical for everyone.
Include the logging header file:
#include
Use the built in logging functionality:
__android_log_print(ANDROID_LOG_INFO, "foo", "Error: %s", foobar);