About the log output of Android &logcat

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.