How to hide, remove, filter logs in the logcat in Eclipse for Android

社会主义新天地 提交于 2019-12-10 19:19:23

问题


I had some difficulties finding the right post for hiding logs in Eclipse for Android (maybe because of the keywords of the subject), that's why I created one. Here is the post I found : (look at ZoFreX's answer, the simplest)

How to exclude certain messages by TAG name using Android adb logcat?


回答1:


The filter that I have found to work the best for me is:

^(?!.*(text_to_filter_out_here)).*$

This works for anything from my experience. I have threads that run infinite loops creating a ton of spam logs that aren't associated with and tags so I just put in part of the log message in the text_to_filter_out_here part and no more logs appear.

Also possible duplicate of these two:

How can I stop admob from spamming my logcat?

How to filter out a tagname in Eclipse LogCat viewer




回答2:


There seem to be (for the moment) no explicit way to hide some logs (from 'libgps' for example). To hide posts which tags are 'tag_1' and 'tag_2', click on the green plus and fill the 'by log Tag' field with :

^(?!(tag_1|tag_2))

And so on if you want to add some tags to hide

Hope this will be helpful



来源:https://stackoverflow.com/questions/16017356/how-to-hide-remove-filter-logs-in-the-logcat-in-eclipse-for-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!