previous next TOC

 

Log4j Levels
 
  • Loggers may be assigned levels. The set of possible levels, that is DEBUG, INFO, WARN, ERROR and FATAL are defined in the org.apache.log4j.Level class.

  • If a given logger is not assigned a level, then it inherits one from its closest ancestor with an assigned level.

  • The root logger resides at the top of the logger hierarchy. It always exists and always has an assigned level.


Level Inheritance Rule

The inherited level for a given logger C, is equal to the first non-null level in the logger hierarchy, starting at C and proceeding upwards in the hierarchy towards the root logger.

 

GET THE DOCS DIRECTLY FROM THE DEVELOPER
For up to date and detailed log4j documentation directly from the developer please consider The complete log4j manual.