android logcat logs chatty module line expire message

I want to add another answer because none of the existing answers actually answered the ‘Am I missing my actual application logcat logs here?‘ question.

Yes, you’re missing the logs. As soon as app considered ‘chatty’ by logcat (more than 5 lines per second), logs of your app will be collapsed.

You can avoid this behaviour by whitelisting your app for logcat:

adb logcat -P '<pid or uid of your app>'

You can print the current white and black lists by executing:

adb logcat -p

Also this command is helpful to print logcat statistics:

adb logcat -S

Additionally, I found useful to auto-whitelist my app for logcat directly from code during tests:

int pid = android.os.Process.myPid();
String whiteList = "logcat -P '" + pid + "'";
Runtime.getRuntime().exec(whiteList).waitFor();

More info can be found in official docs for logcat here

Leave a Comment