Skip to content Skip to sidebar Skip to footer

What Is Logcat In Eclipse?

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.

Solution 1:

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 nothingis ever printed)

For more detail, see Debugging in Android using Eclipse.

Solution 2:

LogCat is an Android feature that allows you viewing logs emitted by the applications running on an Android device.

When you are running your application in debugging mode from Eclipse, you can see plenty of logs appearing in this window: those of your own application, but also those posted by the system and other applications running at the same time on this device.

To log something, you have first to determine how your message is critical (is this debuggin info, an informational message, a warning or an actual error message?) and then use the appropriate method:

Log.d("myApp", "my debug message");  
Log.i("myApp", "my informational message");
Log.w("myApp", "my warning message");
Log.e("myApp", "my error message");

Solution 3:

When you run your applications in debug you can have details on why they are crashing, plus if you want to write in it you can :

Log.i(String tag, String msg);

Solution 4:

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.

Solution 5:

Debugging in Android using Eclipse here is good explantation of how to debug your applications using the Eclipse IDE with the Android plugins,

Post a Comment for "What Is Logcat In Eclipse?"