Logcat is the most powerful debug tool for Android. Logcat is to Android what the dmesg is to kernel. It shows messages logs from system and applications.
logcat can be used directly on board console or via adb.
$ logcat | directly on board console. It gives the complete log message list and waits for any new log message. |
$ logcat & | board console. It gives log list and run in background. Any new log message will be displayed. |
# adb logcat | Using adb you can get log messages through Ethernet or USB connection. |
$ logcat -d > logcat.txt | it sends log messages to logcat.txt file and exits. |
$ logcat *:W | it filters expression displays all log messages with priority level "warning" and higher, on all tags * |
* http://developer.android.com/guide/developing/debugging/debugging-log.html