Logger is the core component of log processing. Log4j has five levels ). The available level of the logger (excluding the Custom Level), which is taken from the log4j API (http://jakarta.apache.org/log4j/docs/api/index.html ):
Static level debug
Debug level indicates that fine-grained information events apply to debugging applicationsProgramIt is very helpful.
Static level info
Info level indicates that messages emphasize the running process of applications at the coarse granularity level.
Static level warn
Warn level indicates a potential error.
Static Level Error
Error level indicates that although an error event occurs, the operation of the system is not affected.
Static level fatal
Fatal level indicates that each serious error event will cause the application to exit.
There are also two available special logging levels (from the log4j API http://jakarta.apache.org/log4j/docs/api/index.html below ):
Static level all
The all level is the lowest level and is used to open all log records.
Static level off
The off level is the highest level and is used to close all log records.
Logger behaviors are classified. See the following table:
It is divided into off, fatal, error, warn, info, debug, all, or the level you define. We recommend that you use only four levels of log4j. The priority ranges from high to low: error, warn, info, and debug. By defining the level here, you can control the switch to the corresponding level of log information in the application. For example, if the info level is defined here, all debug-level logs in the application will not be printed.