Each Android Journal post has a tag and its associated priority:
The tag of a log message is a short string indicating the system component from which the message originates (for example, "View" for the view system). The priority is one of the following character values, ordered from lowest to highest priority: V โ Verbose (lowest priority) D โ Debug I โ Info W โ Warning E โ Error F โ Fatal S โ Silent (highest priority, on which nothing is ever printed)
Here's how to do it:
adb logcat ActivityManager:I MyApp:D *:S
This will result in logs with an ActivityManager tag if they have a priority of Info level or higher (Warning, Error, Fatal). The same goes for messages with a MyApp tag and debug priority or higher. *: S makes all other messages silent.
Check this out in the documentation: http://developer.android.com/guide/developing/tools/adb.html#logcat
Additional tips
I suggest that you keep all other logs at the error or warning level ( *:W ). Sometimes you have a problem in the application due to a system event or a third-party application, and you want to receive notifications about these events!
You might want to change the logcat output format. Play with these settings (information in the same link above)
You might want to check the color output for logcat. I made some changes to this script to better suit my needs, so maybe you can adjust it too. (I tried to send my changes to the author, but he did not respond).
Pedro Loureiro Aug 13 2018-11-11T00: 00Z
source share