Eclipse android logcat shows everything

Sometimes, when I work with my Android projects and connect my phone, the logcat in Eclipse starts telling EVERYTHING what is happening on my phone, and not just the material related to the project I'm working on. Sometimes this only happens.

How can I stop him from showing everything and just show things about my project?

EDIT: I forgot to say I already know about filters, sorry. I'm just wondering why sometimes eclipses of logcat show everything that my phone does, and in other cases it shows only what about the project I'm working with now when it is launched on the phone.

+6
source share
7 answers

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

Then this happens because you have the selected filter and / or eclipse detected an error and just does not show everything that should be.


First answer

There should be a filter window next to the logcat window. Create a filter there. Then select the filter by clicking on the filter you created or placing it automatically through eclipse.

You can filter several things.

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

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

+2
source

You can click on the session filter (left)

Session filter

+2
source

Use

  • Log.d ("key", "value");
  • Log.d ("key1", "value");
  • Log.d ("key2", "value");
  • Log.d ("key2", "value");

If you want to see only key1 messages, go to Logcat
click on the new trap filter in the upper left corner (green color + symbol) see pic a dialog box will be displayed

see pic

a dialog box appears in which the name of the filter is written, i.e. any name
and in, by the log tag, write key1 and click ok. Now you will see a new filter on the left side of your logarithm, click on this, you will only receive key1 messages

see pic

+2
source

I could fix this by selecting my application in DDMS mode.

It is important to choose an application, not just a device. Latter will create this useless "(Session-Filter)"

And this happens β€œsometimes” exactly as the author requested, I think if you change your mobile phone or just turn it off.

enter image description here

+1
source

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

You can also configure your own filter to specify additional information, such as filtering messages with log tags or with the identifier of the process that generated the log message. Filter add filters, edit filters and delete filters allow you to manage your custom filters.

Use filters to determine what you want to see.

0
source

If you use Eclipse, there is a small β€œ+” button in the upper right corner when viewing the LogCat view. This will allow you to create a filter. Just give your filter a name and enter the TAG that it should filter.

0
source

If you are developing filter logging with Eclipse, then you are looking.

If you use logcat via adb from the command line: Filter LogCat to receive only messages from My Android application?

0
source

Source: https://habr.com/ru/post/921313/


All Articles