In the Android group, people often ask me how to use the androidLog , today I will be from the internet and the SDK patchwork come over, let everyone first glimpse of the fast, I hope to get started Android Log has some help.
Android.util.Log commonly used methods include the following 5: LOG.V () log.d () log.i () LOG.W () and log.e () . According to the first letter corresponds to Verbose,debug,info, Warn,error.
1,log.v debugging color is black, any message will be output, here v for verbose wordy meaning, usually use is log.v (", " "");
2, The output color of the LOG.D is blue, only output debug debugging meaning, but he will output the upper level of information, filtering up can be DDMS Logcat tags to choose from .
3, log.i The output is green, the general suggestive message information log.v and LOG.D i , w and e
4,log.w the meaning of orange, can be seen as a warning warning, generally need our attention to optimize the Android Code, It also outputs LOG.E information when it is selected .
5,log.e is red, you can think of error errors, here only the red error message, these errors need our careful analysis, view the stack of information.
Here's a simple Logdemo I made (step by step):
Step 1: Prepare to work ( open logcat window ).
Start Eclipse, in window->show view will come out a dialog box, when we click the OK button, will appear in the console window Logcat windows
Android Log Text Detail (LOG.V,LOG.D,LOG.I,LOG.W,LOG.E)