logcat
Dump a log of system messages, including stack traces when an error occurred, and information messages logged by applications. tldr-pages
On Android
Android
Display system logs
logcatWrite system logs to a file
logcat -f path/to/fileDisplay lines that match a regex
logcat --regex regexDisplay logs for a specific PID
logcat --pid process_idDisplay logs for the process of a specific package
logcat --pid $(pidof -s package)Identify