AhmadReza Payan
AhmadReza Payan

Reputation: 2271

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? 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?

Upvotes: 17

Views: 14406

Answers (5)

dcarl661
dcarl661

Reputation: 322

I didn't need the | (pipe) separator.

package:mine  tag: dataAvailable tag: BLEService

Upvotes: 1

Hesham Fas
Hesham Fas

Reputation: 976

this worked for me:

package:mine (tag:firstTag | secondTag)

Upvotes: 2

InnisBrendan
InnisBrendan

Reputation: 2249

I have my LOGCAT filter setup like this:

package:mine (tag:MyTag1 | tag:MyTag2)

That way I can see messages from only MyTag1 and MyTag2 from my app.

Upvotes: 17

Pratik Popat
Pratik Popat

Reputation: 2999

Android Studio Dolphin | 2021.3.1 Patch 1

package:mine (tag:TAG1 | tag:TAG2)

Upvotes: 4

Veneet Reddy
Veneet Reddy

Reputation: 2907

You can do this by enabling regex and entering:

(My TAG 1)|(My TAG 2)

Upvotes: 37

Related Questions