Correct handling of log information in Android project

Source: Internet
Author: User

We are doing the project, debugging the program is generally debug or log, especially to see some JSON data and so on, like to play log to see, but in the project on the line log information must not be printed out, we can usually download some of the bad app, Connect to eclipse sometimes you can see some of the requested URL or the data returned, if you encounter some technical good people, yes, what do you understand, write a log class below, usually used in the project, is a tool class,

public class Loguitl {private static final Boolean Is_open = true;private static final String TAG = "Loguitl";p ublic Stati c void E (String msg) {LOG.E (TAG, msg);} public static void D (String msg) {LOG.E (TAG, msg);} public static void I (String msg) {LOG.E (TAG, msg);} public static void W (String msg) {LOG.E (TAG, msg);} public static void V (String msg) {LOG.E (TAG, MSG);}}



Correct handling of log information in Android project

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.