Help us understand the problem. What are the problem?

More than 3 years have passed since last update.


Android Studio Logcat regex expressions for efficient debugging

Logcat provides several default filter options (Verbose, Info, Debug etc) and a simple pattern match filter, but the regex filter is the most powerful option for customizing logcat output. Here, I provide 3 useful patterns that have been frequently used to search the logcat more efficiently.

1. Basic INCLUDE filter:


where logcat will only show lines containing the expressions separated by "|" (case-insensitive).

For example, "logging" may be a unique log identifier for your application, and FA is the output from the Firebase Analytics library

2. INCLUDE exact string filter (case-sensitive)


here, we find logs that match FA exactly e.g. FA, FA-SVC from the Firebase Analytics library, and not any line that includes FA, Fa, fa etc

3. EXCLUDE filter by message type/source

Alternatively, if we want to display most of the logs (because we want to observe any unexpected library crashes or device warnings), it is better to EXCLUDE only those messages we can confidently ignore for the current session.




  • E/ corresponds to Error messages, I/ corresponds to Info messages, etc..
  • Wifi, audio_hw_extn corresponds to any message containing these common keywords

Examples of message sources that frequent pollute the logcat and may not be useful for debugging include:
- GnssLocationProvider
- Bundle
- WifiService
- audio_hw_extn
- sensors-hal
- FA|FA-SVC (verbose logging from Firebase Analytics, if not disabled in the application code)

One could also copy their un-filtered logcat to an online text analyzer e.g. to find the most common sources of logs.

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
Help us understand the problem. What are the problem?