user316117
user316117

Reputation: 8271

Android Studio - Logcat - "Show only selected application"

I'm trying to use LogCat in Android Studio 2.2.2 in some debugging but my Logcat runs like a firehose and and there's too much content to see.

In Android Monitor when the LogCat tab is selected there's a dropdown where one of the choices is "Show only selected application" so I selected that but it didn't seem to have any effect. My LogCat runs like a firehose even when I'm disconnected from my debug target. So what does "Show only selected application" do and how can I tell what the "selected application" is?

Upvotes: 14

Views: 12451

Answers (5)

Guillermo
Guillermo

Reputation: 179

Inside the logcat filter box you can write directly:

enter image description here

That shows only all the events of your app.

Upvotes: 2

yoAlex5
yoAlex5

Reputation: 34245

Also you can try PID Cat from Jake Wharton to color logs for specyfic process

[Read more here]

Upvotes: 0

AngusTS
AngusTS

Reputation: 101

The following works on Android Studio 3.4: Use the Logcat filter dropdown at the top right of the Logcat panel. Select "Edit Filter Configuration".

  • Enter your package name in the "Package Name" field.
  • Enter something meaningful to you in the "Filter Name" field (I used my package name again).

Your new filter will now appear in the Logcat filter dropdown, and when selected will show only messages from your package.

Example filter configuration

Upvotes: 10

P1x
P1x

Reputation: 1488

You should enable ADB integration (it's disabled by default now): Tools->Android->Enable ADB integration.

Then you'll be able to see your debuggable processes in the dropdown on the left.

Upvotes: 7

Sahil Mahajan
Sahil Mahajan

Reputation: 3990

Set tag for every log and then filter logs for that specific tag

Log.d("TAG","Application logs");

Edit Filter configuration and add your tag. Then you will only see your application logs

enter image description here

Happy Coding!!

Upvotes: 2

Related Questions