I wish that was more evident in the documentation. I lost days of
development time trying to track a crash in my native jni
application. My program was corrupting memory and the random
missing log messages led me on a completely wild goose chase. You can
imagine my dismay when I found out my logs were basically useless.
That should be one of the first things mentioned in the documentation
on logging. Maybe it is and I just missed it, I naively expected
logging to work.
Thanks for the info!
On Mar 18, 1:35 pm, fadden fad...@android.com wrote:
On Mar 17, 11:59 pm, Hoyle hoyle.ho...@gmail.com wrote:
I've am writing an app that has a major component in C++. In order to
aid debugging I tend to write a lot of data to the logs from C++ (and
a minimal amount from Java). The logs are written out using NDK
logging facilities and also written to files on the device. It seems
that, at least under high logging load, when I run adblogcat from
the command line that it skips log messages randomly.
The kernel log buffer is 64KB. If you manage to write into it faster
thanlogcatcan read out of it, you will lose data.
I think this gets worse if you're running adblogcat from the host
side, sincelogcathas to wait for the tty write to finish before it
can read more data from the kernel. 'adb shell logcat /sdcard/
log.txt' should drop less. The best solution is to write a log
directly to disk (which it sounds like you're already doing).
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
To unsubscribe from this group, send email to
android-developers+unsubscribegooglegroups.com or reply to this email with the
words REMOVE ME as the subject.