Introduction and use of logcat in Android
Zookeeper
Levels of logcat logs are sorted from low to high.
Verbose: redundancy, minimum level. Black
Debug: debug information blue
Info: normal information green
Warning: Orange warning
Error: error red
Assert: the highest assertion level
Debugging information is usually printed through debug or info
The output information of System. out and System. err is also displayed in LogCat, Note that the output information of System. out is Info-level and System. err is Warn-level. |
Android has its own debugging method: You can customize tags and levels.
// Android provides a special method for printing output.
// Print the information tag at the error level. Generally, the tag is the current class name.
Log. e ("aa", "dsdfsf ");
// Print warning level information
Log. w ("aa", "dsdfsf ");
// Print information-level information
Log. I ("aa", "dsdfsf ");
// Print debugging level information
Log. d ("aa", "dsdfsf ");
// Print the redundancy level information
Log. v ("aa", "dsdfsf ");
After running an application with log information, the system will create a filter containing all log information of the application. The name of the filter is the package name of the application. However, there may be bugs, and sometimes some information cannot be filtered out.