Search code examples
androidlogcat

How do I filter logcat messages in the terminal without a tag?


Android Studio's logcat is unusable; it goes in and out and rarely shows messages on restart, so I've started using adb logcat on my terminal. Reading http://developer.android.com/tools/debugging/debugging-log.html gives examples of filtering with a tag. What if I don't know the tag, but want to show all error with an error substring I know?


Solution

  • You can always simply pipe the logcat to grep:

    $ adb logcat | grep 'known error substring'
    

    If you are on Windows, then use find instead:

    C:\> adb logcat | find 'known error substring'