Android Log and androidlog

Source: Internet
Author: User

Android Log and androidlog
1. Android Log overview;

Output logs in the program and use the android. util. Log class. This class provides several static methods:

Log. v (String tag, String msg); // any message is output.
Log. d (String tag, String msg); // only the meaning of debug debugging is output, but the upper-layer information is output.
Log. I (String tag, String msg); // message information
Log. w (String tag, String msg); // warning
Log. e (String tag, String msg); // error

Verbose, Debug, Info, Warning, and Error. A tag is an identifier used as a filter condition.

2. How to view logs; (1) ADB command (you need to configure the ADB environment first)

(1) adb logcat: view all logs

(2) adb logcat-s MyTag: I MyTag is the tag you set, and logs of higher I level will be output;

(3) Stop command line: ctrl + c

(4) Details can refer to the http://blog.csdn.net/tumuzhuanjia/article/details/39555445

(2) Android Monitor (Android Studio display)

It can be completely filtered by keyword, or by regular expression (Regex.

3. Live Template

    

Configure the Template and debug the Log.

 

Reprinted please indicate the source: http://www.cnblogs.com/xsp0303/p/androidLog.html

 

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.