iedoc
iedoc

Reputation: 2325

eclipse android logcat showing everything

Sometimes when I'm working with my android projects, and hook up my phone, the logcat in Eclipse starts to report EVERYTHING that's happening on my phone, not just the stuff relative to the project I'm working on. It only does this sometimes though.

How do I stop it from showing everything and just show the things relative to my project?

EDIT: I forgot to say i already know about filters, sorry. I was just wondering why sometimes eclipses logcat shows everything my phone is doing, while other times it only shows what's relative to the project i'm currently working with when running it on the phone.

Upvotes: 6

Views: 7517

Answers (7)

Murmel
Murmel

Reputation: 5722

I could fix this by selecting my app in the DDMS-view.

It is important to select the app and not only the device. Latter will only create this useless "(Session-Filter)"

And this happens "sometimes" quite like the author asked for, i think if you change your mobile phone or just disconnect it.

enter image description here

Upvotes: 1

LMK
LMK

Reputation: 2962

Use

  1. Log.d("key","value");
  2. Log.d("key1","value");
  3. Log.d("key2","value");
  4. Log.d("key2","value");

If you want to see only key1 messages ,then go to Logcat
click on add new logcat filter at top left corner(green color + symbol) see pic then a dialog box will be shown

see pic

then a dialog box will be shown, in that write Filter Name ie anyname
and in , by Log Tag write key1 and click on ok button.Now you will see a new filter on left side of your logcat click on that,you will get only key1 messages

see pic

Upvotes: 2

prolink007
prolink007

Reputation: 34594

I forgot to say i already know about filters, sorry.

Then it is because you have a filter selected and/or eclipse has encountered an error and is just not showing everything it should be.


First Answer

Next to your logcat window should be a Filter window. Create a filter there. Then select the filter by clicking the filter you have made or was put there automatically by eclipse.

You can filter on several things.

Most people will create a static string in their Main Activity/Service containing the application name. Use this static string as your TAG for all of your Logs. Then you can filter on this string you put for the static string.

Also, right clicking in the logcat window will bring up a filter dialog.

Upvotes: 2

Benito Bertoli
Benito Bertoli

Reputation: 25793

You can click on the session filter (left)

Session Filter

Upvotes: 2

Korhan Ozturk
Korhan Ozturk

Reputation: 11320

If you are developing with Eclipse creating a log filter is what you are looking for.

If you are using logcat through adb from the command line: Filter LogCat to get only the messages from My Application in Android?

Upvotes: 0

Luke Taylor
Luke Taylor

Reputation: 9599

If you are using Eclipse, when viewing the LogCat view, there is a little green "+" button in the upper right corner. This will allow you to create a filter. Simply give your filter a name and input the TAG it should filter by.

Upvotes: 0

ian.shaun.thomas
ian.shaun.thomas

Reputation: 3488

http://developer.android.com/tools/debugging/ddms.html#logcat

You can also setup your own custom filter to specify more details such as filtering messages with the log tags or with the process id that generated the log message. The add filter, edit filter, and delete filter buttons let you manage your custom filters.

Use filters to define what you want to look at.

Upvotes: 0

Related Questions