简体   繁体   English

如何隐藏,删除,过滤Eclipse for Eclipse中的logcat中的日志

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

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. 我在Eclipse中为Eclipse隐藏日志时遇到了一些困难(可能是因为主题的关键字),这就是我创建一个的原因。 Here is the post I found : (look at ZoFreX's answer, the simplest) 这是我发现的帖子:(看看ZoFreX的答案,最简单的)

How to exclude certain messages by TAG name using Android adb logcat? 如何使用Android adb logcat按TAG名称排除某些邮件?

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. 我有运行无限循环的线程,创建了大量与之关联的垃圾邮件日志和标签,所以我只是在text_to_filter_out_here部分放入部分日志消息,不再显示日志。

Also possible duplicate of these two: 也可能重复这两个:

How can I stop admob from spamming my logcat? 如何阻止admob发送垃圾邮件?

How to filter out a tagname in Eclipse LogCat viewer 如何在Eclipse LogCat查看器中过滤掉标记名

There seem to be (for the moment) no explicit way to hide some logs (from 'libgps' for example). 似乎(暂时)没有明确的方法来隐藏一些日志(例如来自'libgps')。 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”的帖子,请点击绿色加号并填写“按日志标记”字段:

^(?!(tag_1|tag_2))

And so on if you want to add some tags to hide 如果你想添加一些标签来隐藏,依此类推

Hope this will be helpful 希望这会有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM