2023-01-02 16:42:02 +00:00
|
|
|
# adb logcat
|
2022-09-01 22:16:29 +01:00
|
|
|
|
|
|
|
> Dump a log of system messages.
|
2024-02-16 15:37:37 +00:00
|
|
|
> More information: <https://developer.android.com/tools/logcat>.
|
2022-09-01 22:16:29 +01:00
|
|
|
|
|
|
|
- Display system logs:
|
|
|
|
|
|
|
|
`adb logcat`
|
|
|
|
|
2024-02-09 14:34:08 +00:00
|
|
|
- Display lines that match a regular [e]xpression:
|
2022-09-01 22:16:29 +01:00
|
|
|
|
|
|
|
`adb logcat -e {{regular_expression}}`
|
|
|
|
|
|
|
|
- Display logs for a tag in a specific mode ([V]erbose, [D]ebug, [I]nfo, [W]arning, [E]rror, [F]atal, [S]ilent), filtering other tags:
|
|
|
|
|
|
|
|
`adb logcat {{tag}}:{{mode}} *:S`
|
|
|
|
|
|
|
|
- Display logs for React Native applications in [V]erbose mode [S]ilencing other tags:
|
|
|
|
|
|
|
|
`adb logcat ReactNative:V ReactNativeJS:V *:S`
|
|
|
|
|
|
|
|
- Display logs for all tags with priority level [W]arning and higher:
|
|
|
|
|
|
|
|
`adb logcat *:W`
|
|
|
|
|
2023-04-01 23:48:20 +01:00
|
|
|
- Display logs for a specific PID:
|
|
|
|
|
|
|
|
`adb logcat --pid={{pid}}`
|
|
|
|
|
|
|
|
- Display logs for the process of a specific package:
|
|
|
|
|
|
|
|
`adb logcat --pid=$(adb shell pidof -s {{package}})`
|
|
|
|
|
2022-09-01 22:16:29 +01:00
|
|
|
- Color the log (usually use with filters):
|
|
|
|
|
|
|
|
`adb logcat -v color`
|