android logcat logs chatty module line expire message

AndroidLogcatAndroid Logcat

Android Problem Overview


I am getting lots of this kind of logcat messages related to my application.

11-19 19:04:23.872 3327 3440 I chatty : uid=10085 com.xxxx.yyy expire 18 lines

What are these log messages? Am I missing my actual application logcat logs here?

Android Solutions


Solution 1 - Android

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

Solution 2 - Android

Yes, this indicates that some messages did not make it into the actual log, maybe because other application(s) send too many messages into it.

This seem to be a new thing in liblog in Marshmallow(?). Can't find a clear explanation of the new logging policy, or even if there is actually one, but the change is kind of mentioned [here] :

> We declared an application as too chatty once it logs more than 5 > lines a second. Please file a bug against the application's owner that > is producing this developer-verbose-debug-level class logging spam. The logs > are 256KB, that means the application is creating a DOS attack and > shortening the logs timepan to 6 seconds(!) making it useless for all others.

[here]: https://code.google.com/p/android/issues/detail?id=180738 "here"

Solution 3 - Android

You can disable this behavior by using:

adb logcat -P ""

or by setting

setprop ro.logd.filter disable

setprop persist.logd.filter disable 

You can check the code at

http://androidxref.com/7.1.2_r36/xref/system/core/logd/LogWhiteBlackList.cpp

Solution 4 - Android

You can disable this behavior by using:

adb logcat -P ""

Solution 5 - Android

First execute adb logcat -S to check your application is under Chattiest UID/PID.

If it is there whitelist your application by executing below command

adb logcat -P "UID/PID"

To check all your whitelisted/blacklisted application execute below command

adb logcat -p

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAndRSoidView Question on Stackoverflow
Solution 1 - AndroidAnton MalmyginView Answer on Stackoverflow
Solution 2 - AndroidАндрей ВахрушевView Answer on Stackoverflow
Solution 3 - Androidnkalra0123View Answer on Stackoverflow
Solution 4 - AndroidDan SchmittView Answer on Stackoverflow
Solution 5 - AndroidMagudeshView Answer on Stackoverflow