Types of log levels in Tomcat 7
There are seven levels defined for Tomcat logging services (JULI). They can be set based on the application's requirement. The following figure shows the sequence of the log levels for JULI:
Every log level in JULI has its own functionality. The following table shows the functionality of each log level in JULI:
Log level |
Description |
---|---|
SEVERE(highest) |
Captures exception and Error |
WARNING |
Warning messages |
INFO |
Informational message, related to the server activity |
CONFIG |
Configuration message |
FINE |
Detailed activity of the server transaction (similar to debug) |
FINER |
More detailed logs than FINE |
FINEST(least) |
Entire flow of events (similar to trace) |
For example, let's take an appender from logging.properties and find out the log level used; the first log appender for localhost is using FINE as the log level, as shown in the following code snippet:
localhost.org.apache.juli.FileHandler.level = FINE
localhost.org.apache.juli.FileHandler.directory...