android logcat logs chatty module line expire message

后端 未结 5 745
我寻月下人不归
我寻月下人不归 2020-12-01 01:03

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<

5条回答
  •  粉色の甜心
    2020-12-01 01:21

    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 ''

    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

提交回复
热议问题