Android Logging
This post describes how to create log statements in Android applications. Android uses the android.util.Log class for logging. This class supports various levels (VERBOSE, DEBUG, INFO, WARN, ERROR) and contains numerous methods to print debugging information to the logcat utility. Logcat is visible in the debug perspective in Eclipse or by running adb logcat on the command line. You can read more about it here . Log.w("MyTag", "Mymessage"); This code will output a warning with the tag MyTag and the message "Mymessage". The first parameter of these method is the category and the second is the message. Usually you use this code: public static final String TAG = "it.gmariotti.android.apps.Myapp"; log.w(TAG,"MyMessage"); It is very important to turn down logging when you deploy your app to the market. Google advises that a deployed application should not contain logging code. We can find a very good example in Google I/O 2012 a...