| Level | Priority | Use Case |
| Log.v() | Verbose (V) | Everything. Detailed tracing of functions, variable values, lifecycle events. |
| Log.d() | Debug (D) | General debugging messages useful for development. |
| Log.i() | Info (I) | Important business logic messages, typical user actions, system state changes. |
| Log.w() | Warn (W) | Use of deprecated APIs, non-critical errors that can be recovered. |
| Log.e() | Error (E) | Critical errors that cause a failure or stop a feature from working. |
| Log.wtf() | Assert (A) | What a Terrible Failure. Reserved for conditions that should never happen. |
Option to filter in Andorid Studio Logcat
- tag: Filters messages by a specific log tag.
Example: tag:MyActivity - level: Filters messages at the specified log level or higher. Levels include VERBOSE (V), DEBUG (D), INFO (I), WARN (W), ERROR (E), and ASSERT (A).
Example: level:ERROR (shows ERROR and ASSERT logs) - process: Filters messages by the process name or process ID (PID).
Example: process:1234 or process:com.example.app - age: Filters messages by how recent they are. The value is a number followed by a unit of time: s (seconds), m (minutes), h (hours), or d (days).
Example: age:5m (shows messages from the last 5 minutes) - is: Can be used with crash to filter only crash logs.
Example: is:crash - package: A convenient shortcut to filter logs only from the currently running application's package.
Logical operation can be use in Logcat Filter
- && (AND): Requires both conditions to be true.
Example: package:mine && level:WARN - | (OR): Requires at least one condition to be true.
Example: tag:Tag1 | tag:Tag2 - - (NOT/Exclude): Excludes logs matching the condition. Place the hyphen before the key.
Example: -tag:ExcludedTag
Example usage Logcat filter:
- package:mine level:INFO "user data" -tag:network
- tag:MyTag && level:DEBUG || is:crash
Credit: Table conversion to html online http://the-mostly.ru/online_html_table_generator.html