Logcat level and debug use of Logcat

Source: Internet
Author: User

In Android development, we will find that the SYSTEM.OUT.PRINTLN () output information becomes unusually troublesome, the virtual machine can be seen on the upside, but on the real machine, the log information constantly rolling, resulting in an instant is brushed off, So we typically use Logcat to test and debug the information that the program outputs.

The 5 letters in the upper right of Logcat represent 5 different types of log information (and are distinguished by different colors, the higher the level, the more prominent the color):

1. [V]: detailed (Verbose) information, the output color is black

2. [D]: Debug (Debug) information, output color is blue

3. [I]: Notice (info) information, output color is green

4. [W]: Warning (Warn) information, output color is orange

5. [E]: Error information, the output color is red, here the error message is the highest level, followed by a warning message, followed by notification information and debugging information, the lowest level is the details.

6.[assert], new version added.

So how do you use Logcat?

We use the log class as follows:

You'll see that the log is in various levels, and we're using the key, value mode.

When we debug the program, we can filter the information according to the conditions, so that something useful is sweeping:

By the Sihai small dense

Logcat level and debug use of Logcat

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.