LevelsAfter obtaining a Logger and writing a log message, the first check on the message is whether it is loggable based on the Level of the message and the threshold of the logging in your application. Not including the generic log method, there are five logging Levels that correspond to the five methods required by ILog to exist in all Loggers (see Table 8.2). In addition, there are two special log Levels to turn logging off or to turn it on full-blast.
See the TraceLog extension for an example of defining new levels and using them in a new interface.The Levels are cumulative in that they allow all messages at their Level and at any Level less strict than themselves. Figure 8-2 demonstrates which messages will be logged in a given Level. Figure 8-2. Logging Levels.[View full size image] ![]() then the message will not be logged because the top axis of the graph shows that in WARN, only WARN, ERROR, and FATAL messages are logged. This is the first Filter of the message. Additional, more powerful Filters can be set using the Filter class. If the message passes through the Level check, it is then passed to any configured Appenders. |

