How long do Android log entries stay in memory
android, buffer, logging
Solution
Basically, it depends how much logging you (and other apps, and the system) are doing. Logcat uses a fixed-size buffer, rather than one with a maximum-age.
You can do `adb logcat -g` to see the size of the buffer on your device, as it varies.
Problem
I'm developing a location monitoring application for Android. One of my requirements is for it to be able to run for 7 continuous hours. To test that requirement I'm going to use the Android logging system to log the percentage of battery life left every 5 minutes (or possibly more). I might do this for an hour and then do some maths and work out if the application could run for 7 hours. I read that the log entries are stored in a buffer. How often is this buffer flushed? Is there a better way for me to test my application? I'm still doing some research on different approaches to take but unfortunately most testing guides assume that your device is connected to a PC. Source : http://developer.android.com/tools/help/logcat.html