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

查看:27
本文介绍了如何在 Eclipse LogCat 查看器中过滤掉标记名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Android 应用程序垃圾邮件"LogCat,我想删除它的 logcat 条目以使输出更具可读性.

I have an Android application that "spams" the LogCat and I would like to remove its logcat entries in order to have an output more readable.

是否可以有一个过滤器来删除特定标签名称的 LogCat 条目?或者一个可以解决问题的搜索模式?

Is it possible to have a filter that remove the LogCat entries for a specific tag name? Or a search pattern that does the trick?

推荐答案

是的.创建一个过滤器,其中按日志标签"字段是

Yes. Create a filter where the "By log tag" field is

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

其中 MYTAG 是您不想看到的标签.我不是正则表达式专家(正则专家"?;-))所以可能有一种更简单的方法来进行否定,但我只是尝试过,并且有效.

where MYTAG is the tag you don't want to see. I am not a regexp expert (a "regexpert"? ;-) ) so there may be a simpler way to do that negation, but I just tried that and it works.

您可以在 Log Cat 消息区域上方的字段中使用过滤器,在那里输入过滤器字符串,如下所示:

You can play around with the filter in the field just above the Log Cat message area, by entering filter strings there, like this:

tag:^(?!.*(DeskClock|dalvik|wpa)).*$

这将显示所有消息除了标签DeskClock"、dalvik"和wpa".

which will show all messages except tags "DeskClock", "dalvik", and "wpa".

这篇关于如何在 Eclipse LogCat 查看器中过滤掉标记名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆