Original article address
InAndroidPeople in the group often ask me,Android logHow is it used? Today I willSDKLet's get started quickly. I hope to get started with you.Android logSome help.
Common android. util. Log methods include:5Items:Log. V () Log. D () Log. I () log. W ()AndLog. E (). Corresponds to the first letterVerbose,Debug, info, warn, and error.
1. the debugging color of log. V isBlack, Any message will be output. Here v stands for verbose, which is usually used as log. V ("","");
2. The output color of log. D isBlueOnly the meaning of DEBUG debugging is output, but the upper-layer information is output, which can be selected through the logcat tag of ddms.
3. The output of log. I isGreenGenerally, the prompt message information does not output the information of log. V and log. D, but displays the information of I, W, and E.
4. log. W meansOrangeIt can be seen as a warning of warning. Generally, we need to optimize the android code and select it to output log. e information.
5. If log. e is red, you can think of error errors. Here, only red error messages are displayed. We need to carefully analyze these errors and view stack information.
OpenLogcatWindow to view.