Android log usage and Android log usage

Source: Internet
Author: User

Android log usage and Android log usage

Private static final String ACTIVITY_TAG = "MainActivity ";

 

Log. v (MainActivity. ACTIVITY_TAG, "This is Verbose ");
Log. d (MainActivity. ACTIVITY_TAG, "This is Debug .");
Log. I (MainActivity. ACTIVITY_TAG, "This is Information ");
Log. w (MainActivity. ACTIVITY_TAG, "This is Warnning .");
Log. e (MainActivity. ACTIVITY_TAG, "This is Error .");

View the specified Tag in Eclipse logcat

Tag: MainActivity

You can also

System. out. println ("tag by System out ");

Tag: System. out

 

To view a variable, You need to convert the variable to the String type.

Int k = 563;
Log. v (MainActivity. ACTIVITY_TAG, "This is Verbose k =" + k );

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.