0

When I try to debug my app with logcats in android studio, a bunch of unwanted logs(related to android OS or whatever) are showing which makes my logs hard to be found.

I know that I can filter logs by using certain TAGS but I was wondering if there is any better way of seeing ONLY the logcats you have explicitly written in your own code without writing a regexp which includes all your TAGS.

For example I can use this regexp for 3 tags:

MainTagName|SomeTagName|SomeOtherTagName

but I have to update it everyTime.

Kwnstantinos Nikoloutsos
  • 1,832
  • 4
  • 18
  • 34
  • 3
    Possible duplicate of [Filter LogCat to get only the messages from My Application in Android?](https://stackoverflow.com/questions/6854127/filter-logcat-to-get-only-the-messages-from-my-application-in-android) – Arthur Attout Apr 13 '19 at 12:22

1 Answers1

0

If using Android Studio to view logcat, there is a built in option for it. Open up logcat, then in the top right corner of the logcat window, hit the drop-down next to Regex, and click "Edit Filter Configurations."

Enter a filter name (anything you want), and then put your tag in the "Log Tag" field.

If using logcat via terminal, you can grep for your tag:

adb shell logcat | grep -E "tag1"
AzraelPwnz
  • 506
  • 2
  • 12