2019-11-14 00:16:39 +00:00
|
|
|
# logcat
|
|
|
|
|
2022-10-02 21:13:51 +01:00
|
|
|
> Dump a log of system messages, including stack traces when an error occurred, and information messages logged by applications.
|
2024-02-16 15:37:37 +00:00
|
|
|
> More information: <https://developer.android.com/tools/logcat>.
|
2019-11-14 00:16:39 +00:00
|
|
|
|
|
|
|
- Display system logs:
|
|
|
|
|
|
|
|
`logcat`
|
|
|
|
|
2024-02-09 14:34:08 +00:00
|
|
|
- Write system logs to a [f]ile:
|
2019-11-14 00:16:39 +00:00
|
|
|
|
|
|
|
`logcat -f {{path/to/file}}`
|
|
|
|
|
2021-05-10 10:03:12 +01:00
|
|
|
- Display lines that match a regular expression:
|
2019-11-14 00:16:39 +00:00
|
|
|
|
2021-05-10 10:03:12 +01:00
|
|
|
`logcat --regex {{regular_expression}}`
|
2023-04-01 23:48:20 +01:00
|
|
|
|
|
|
|
- Display logs for a specific PID:
|
|
|
|
|
|
|
|
`logcat --pid={{pid}}`
|
|
|
|
|
|
|
|
- Display logs for the process of a specific package:
|
|
|
|
|
|
|
|
`logcat --pid=$(pidof -s {{package}})`
|