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