The log recorder (Logger) is the core component of log processing. LOG4J has 5 levels of normal (level). Available level levels (excluding custom level levels) for the logger (Logger), the following is an excerpt from the log4j API (http://jakarta.apache.org/log4j/docs/api/index.html):
Static level DEBUG
The debug level indicates that fine-grained informational events are useful for debugging applications.
Static level INFO
The INFO level indicates that the message highlights the application's running process at the coarse-grained levels.
Static level WARN
The WARN level indicates a scenario where a potential error occurs.
Static level ERROR
The error level indicates that, while an incorrect event occurs, it does not affect the continued operation of the system.
Static level FATAL
FATAL level indicates that each serious error event will cause the application to exit.
In addition, there are two special logging levels available: (The following description comes from the log4j API http://jakarta.apache.org/log4j/docs/api/index.html):
Static level All
All levels are the lowest level and are used to open all log records.
Static level off
Off levels are the highest level and are used to turn off all log records.
The behavior of the log recorder (Logger) is hierarchical. As shown in the following table:
is divided into off, FATAL, ERROR, WARN, INFO, DEBUG, all, or levels you define. LOG4J recommends using only four levels, from high to low, respectively, for error, WARN, INFO, and DEBUG. By the level defined here, you can control the switch to log information at the appropriate level in your application. For example, if the info level is defined here, all debug-level log information in the application will not be printed