0

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.

1

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".

0

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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.