I'm not aware of anything specifically targeting this use case, but I have workarounds for you.
(我不知道有什么专门针对此用例的,但是我为您提供了解决方法。)
Search (搜索)
Focus the LogCat window by clicking into it and the press Ctrl+F , this brings up the local search bar and you can enter your package name:
(通过单击将焦点对准LogCat窗口,然后按Ctrl + F ,这将弹出本地搜索栏,您可以输入软件包名称:)
Filter logs (过滤日志)
This solution is from my question: How can I disable Android's internal logging for specific tags (eg AbsListView, GestureDetector, endeffect) If you're having problems with spamming log lines you don't care about just filter them out, for example I have this configuration:
(该解决方案来自于我的问题: 如何禁用特定标签(例如AbsListView,GestureDetector,endeffect)的Android内部日志记录?如果您在发送垃圾邮件时遇到问题,则不必在乎仅过滤掉它们,例如,此配置:)
^(?!AbsListView|endeffect|GestureDetector|CustomFrequencyManager|ApplicationPackageManager|PersonaManager|ProgressBar|ViewRootImpl|MotionRecognitionManager)
^(?!Unable to resolve superclass of|Link of class|DexOpt: unable to opt direct call|Could not find class|Could not find method|VFY: )
This leaves only the most important/relevant log lines:
(这仅留下最重要/相关的日志行:)
- your app's logs
(您应用的日志)
-
dalvikvm
's Garbage Collections (dalvikvm
的垃圾回收)
-
StrictMode
- and other unexpected things
(和其他意外的事情)
High-level logging (高级日志记录)
I don't suggest you do this, included for completeness.
(我不建议您这样做,包括完整性。)
Use only Log.wtf
and Log.e
for your own logging and set colors/LogCat view's level filter accordingly. (仅将Log.wtf
和Log.e
用于您自己的日志记录,并相应地设置颜色/ LogCat视图的级别过滤器。)
This is not really useful if you want to have 5 levels of logging. (如果您希望具有5个级别的日志记录,这并不是真正有用的。)
There may be some sneak-in log lines, but less than normal. (可能会有一些偷偷摸摸的日志行,但比正常情况少。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…