I'm porting my C++ application to Android using NDK and wonder where the clog out goes to? I am trying to debug by adding print statements, but I cannot find where they are sent. Where does clog get sent in a C++ application running under Android NDK?
Asked
Active
Viewed 234 times
0
-
Have you looked at the output of logcat? – mah Apr 16 '14 at 22:38
-
No, where do I find `logcat`? – WilliamKF Apr 16 '14 at 23:31
-
`adb logcat`, or if you've got a shell on the device/emulator, just type the command `logcat`. Also if you use Eclipse, it will show you the running log. – mah Apr 17 '14 at 00:08
-
@mah I'm using Eclipse and the LogCat does not show my messages sent to `cout` or `clog`. – WilliamKF Apr 17 '14 at 00:22
1 Answers
0
Please see Is "std::cout" usable in Android-ndk. TL;NR:
$ adb shell stop
$ adb shell setprop log.redirect-stdio true
$ adb shell start
-
Is this setting persistent if I rebuild and run my application again from eclipse? – WilliamKF Apr 16 '14 at 23:58
-
It is persistent until device reboot. It does not relate to your app at all. It works on the device scope. – Alex Cohn Apr 17 '14 at 05:08