Android provides its own log output api--> located in the Android.util.Log class.
This class compares the common print log method to have 5, these 5 methods will print the log to the Logcat:
1 log.v (tag,message); // 2 log.d (tag,message); // 3 log.i (tag,message); // 4 LOG.W (tag,message); // 5 log.e (tag,message); //
Where tag and message are two string values. From the Android Development Help documentation, the definitions for tag and message are:
Tag used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
MSG the message would like logged.
You can see that tag is used to mark the source of the log message. And the message is the contents of this log.
From the output of the log to calculate, Error,warn,info,debug,verbose, the number from less to more.
I changed the methods of the previous activity, adding LOG.V to each method to record the output of the log, as the result.
As you can see, those on** methods that previously called the LOG.V function were eventually executed, and the logs were also printed.
(Transferred from: http://www.cnblogs.com/leipei2352/archive/2011/08/10/2133158.html)
About the log output of Android &logcat