Logcat
Basic logging
adb shell
logcat
With root privileges
adb shell
su
logcat
Log levels
D- debugI- informationW- warningE- error
Save to file
logcat > /sdcard/Documents/logs.txt
Filtering
cat logs.txt | grep -v -i wifi | grep -v -i window
Logcat for a specific process
adb shell ps | grep bank
adb logcat | grep 12543