[英]How to Filter for multiple tags in LogCat in Android Studio?
I'd like to filter my LogCat based on multiple TAG, How can I achieve this?我想根据多个 TAG 过滤我的 LogCat,我该如何实现? Should I use Regex in order to filter by multiple TAG?
我应该使用正则表达式来按多个标签过滤吗?
For example, I have this two lines of code which are used in my codes:例如,我的代码中有两行代码:
private static final String TAG1 = "My TAG 1";
private static final String TAG2 = "My TAG 2";
Can I filter out the LogCat to show both of them in the result?我可以过滤掉 LogCat 以在结果中显示它们吗?
您可以通过启用正则表达式并输入:
(My TAG 1)|(My TAG 2)
I have my LOGCAT filter setup like this:我的 LOGCAT 过滤器设置如下:
package:mine (tag=:MyTag1 | tag=:MyTag2)
That way I can see messages from only MyTag1
and MyTag2
from my app.这样我就可以从我的应用程序中看到来自
MyTag1
和MyTag2
的消息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.