Log. V log. D log. e log. I log. W

Source: Internet
Author: User
In debuggingCodeWe need to view the debugging information, then we need to use the android log class.

 

Android. util. log has the following five common methods:Log. V (), log. D (), log. I (), log. W (), log. E ()

Correspond to the first letter:Verbose, debug, info, warn, error


1. log. v The output color of is black, and any message will be output. Here v stands for verbose, which is usually used as log. V ("","");


2. log. d The output color is blue. Only debug debugging is output. However, it outputs the upper-layer information and can be selected using the logcat tag of ddms.


3. log. I The output color of is green. Generally, it indicates message information. It does not output information of log. V and log. D, but displays information of I, W, and E.


4. log. W  The output color is orange, which can be seen as a warning of warning. Generally, we need to optimize the android code and select it to output the log. e information.


5. log. e  The output color of is red. You can think of error errors. Here only red error messages are displayed. We need to carefully analyze these errors and view the stack information.


Note: different printing methods are used with the (string tag, string MSG) parameter in a method. Tag indicates the tag of the printed information, and MSG indicates the information to be printed.

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.