android logcat 记录闲聊模块行过期消息 [英] android logcat logs chatty module line expire message
问题描述
我收到了很多与我的应用程序相关的此类 logcat 消息.
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 过期 18 行
这些日志消息是什么?我是否在这里遗漏了我的实际应用程序 logcat 日志?
What are these log messages? Am I missing my actual application logcat logs here?
推荐答案
我想添加另一个答案,因为现有答案中没有一个真正回答了我是否在这里缺少实际应用程序 logcat 日志?'问题.
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.
是的,您缺少日志.一旦应用被 logcat 视为健谈"(每秒超过 5 行),您的应用的日志就会被折叠起来.
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.
您可以通过将您的应用列入 logcat 白名单来避免这种行为:
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
此命令也有助于打印 logcat 统计信息:
Also this command is helpful to print logcat statistics:
adb logcat -S
此外,我发现在测试期间直接从代码自动将我的应用程序列入 logcat 白名单很有用:
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();
可以在 logcat 的官方文档中找到更多信息这里
More info can be found in official docs for logcat here
这篇关于android logcat 记录闲聊模块行过期消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!