I am using android jellybeans. There is a large amount of debug information being dumped by many components. So, I notice that logs from my application are often lost. I have tried dumping logcat log in to a file in the phone and then doing a "adb pull". Still, there is a good amount of logs thar are lost. Is there a way to ensure no logs are lost.
2 Answers
Logging on Android uses a ring buffer with a fixed size (exact size depends on different criteria), see e.g. What is the size limit for Logcat?, so older entries get overwritten once the buffer is "full". You can adjust the size of the buffer (see: How do I increase the log size of dev/log/main?) -- but those adjustments would probably not survive a boot.
If you really want to make sure no log data is lost, you would need to pipe the log to some "external ressource" -- either to some "external storage" or "the cloud".
First the log in android it's a circular log, that means that if you have a lot of logging going out there you're older statements will be overwritten. Why don't you use a custom solution like microlog for android http://code.google.com/p/microlog4android/
You can use command logcat | grep 'YOURTAG', for only showing your apps logs. It can be done through any Terminal Emulator, or using Android Debug Bridge (adb)