Android: adb: filtering logcat

Usually I use IDE, but sometimes I have to create a very precise LOGCAT FILTER in terminal window.
Here is how I create a tag:
private static final String TAG = SomeActivity.class.getSimpleName();
Log.d(TAG, "some description");
You could use getCannonicalName
Here I have following TAG filters:
  • any (*) View - VERBOSE
  • any (*) Activity - VERBOSE
  • any tag starting with Xyz(*) - ERROR
  • System.out - SILENT (since I am using Log in my own code)
Here what I type in terminal:
$  adb logcat *View:V *Activity:V Xyz*:E System.out:S

please +1 on stockoverflow:

http://stackoverflow.com/a/29307682/3566154









It takes time and effort to create tutorials, please support my efforts with a couple-dollar donation, any amount will be greatly appreciated and highly motivating!



As an Amazon Associate I earn from qualifying purchases.

My favorite quotations..


“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.”  by Robert A. Heinlein

"We are but habits and memories we chose to carry along." ~ Uki D. Lucas


Popular Recent Articles