What does LogCat do in Eclipse?
How do I use it? I have never used the log cat before in Eclipse, so I don\'t understand.
Logcat is some kind of file where all debug information and errors are stored. You can simply access it by either using the command "adb shell logcat" in a terminal on your developer machine with the development sdk or download an app like "alogcat" from the market.
Like mthpvg and Pratik said, it is really handy and you can write your own messages in it.
Debugging in Android using Eclipse here is good explantation of how to debug your applications using the Eclipse IDE with the Android plugins,
I think the best explanation is in How to add LogCat?
The Android logging system provides a mechanism for collecting and viewing system debug output. Logs from various applications and portions of the system are collected in a series of circular buffers.
Logcat can be accessed using the command line. More information is in logcat (at Android Developers).
If you're using Eclipse and the Android plugin for Eclipse, it's available in the Debug perspective. More (unofficial) information about this is in Debugging in Android using Eclipse.
This is a nice and quick way to exchange information from the application on your device and the development computer.
To use Logcat, first import android.util.Log
into your project. Now you can call the static class Log from your project to start logging. As you can see below, Logcat has different levels of logging. When debugging, we’ll just use Debug (D) to log the progress. Of course, when you want to log an actual error, you will use Error (E).
V — Verbose (lowest priority)
D — Debug
I — Info
W — Warning
E — Error
F — Fatal
S — Silent (highest priority, on which nothing is ever printed)
For more detail, see Debugging in Android using Eclipse.
Logcat - used for debugging purposes Print different messages to Logcat using android.util.Log class
Syntax: Log.d(String tag, String message) Sample:
Log.d("LIFECYCLE","onCreate was called");
Other methods:
Log.i(String tag, String message);//i = information
Log.e(String tag, String message);//e = error
Log.w(String tag, String message);//w = warning