Android Log Text Detail (LOG.V,LOG.D,LOG.I,LOG.W,LOG.E)

Source: Internet
Author: User

In the Android group, people often ask me how to use the androidLog , today I will be from the internet and the SDK patchwork come over, let everyone first glimpse of the fast, I hope to get started Android   Log has some help.

Android.util.Log commonly used methods include the following 5: LOG.V () log.d () log.i () LOG.W () and log.e () . According to the first letter corresponds to Verbose,debug,info, Warn,error.

1,log.v debugging color is black, any message will be output, here v for verbose wordy meaning, usually use is log.v (", " "");

2, The output color of the LOG.D is blue, only output debug debugging meaning, but he will output the upper level of information, filtering up can be DDMS Logcat tags to choose from .

3, log.i The output is green, the general suggestive message information log.v and LOG.D i , w and e

4,log.w the meaning of orange, can be seen as a warning warning, generally need our attention to optimize the Android Code, It also outputs LOG.E information when it is selected .

5,log.e is red, you can think of error errors, here only the red error message, these errors need our careful analysis, view the stack of information.

Here's a simple Logdemo I made (step by step):

Step 1: Prepare to work ( open logcat window ).

Start Eclipse, in window->show view will come out a dialog box, when we click the OK button, will appear in the console window Logcat windows

Android Log Text Detail (LOG.V,LOG.D,LOG.I,LOG.W,LOG.E)

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.