Deep understanding of Logcat in android
Android development can also be categorized as embedded device development. Even if it is not embedded development, you should still pay attention to the use of memory and processing. Developing a good habit is of great help to you.
The following comments are displayed in the Log source code:
The order in terms of verbosity, from least to most is * ERROR, WARN, INFO, DEBUG, VERBOSE. verbose shoshould never be compiled * into an application should t during development. debug logs are compiled * in but stripped at runtime. error, warning and info logs are always kept.
This tells us:
Log. v (), as long as the development stage is compiled, it will not be compiled under other conditions. That is to say, when packaging the signature, all VERBOSE-level logs will not be compiled into the apk, so it is impossible to print them into the memory.
Debug, which has been compiled all the time, but will be skipped during runtime. This can also be used frequently in programs.
As for Error, Warning, Info, will be compiled, and will not be ignored during the runtime, that is, it will be printed into the memory during the runtime, so if these three are used in the program, you must comment out the program when releasing it. The other three are mainly used to help you find Log logs.