The log level describes the type of material that is contained in the message. The following values apply: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, and FINEST. These log levels are hierarchically inclusive, which means that if you set a particular log level, such as INFO, the messages that have log levels above that level (SEVERE and WARNING) are also included. If you set the log level to the lowest level, FINEST, your output will include all the messages in the file. The default setting is INFO.
There are two levels of log settings available: global and logger-specific. If you have chosen a logger-specific setting that is different from the global setting, the logger-specific setting takes precedence.
Because setting log levels is a dynamic operation, you do not need to restart Enterprise Server for changes to take effect.
The following topics are addressed here:
The global log level specifies which kinds of events are logged across all loggers. The default level for message output to the console is INFO (which also includes SEVERE and WARNING messages).
The ConsoleHandler has a separate log level setting that limits the messages that are displayed. For example:
java.util.logging.ConsoleHandler.level = INFO java.util.logging.ConsoleHandler.formatter = com.sun.enterprise.server.logging.UniformLogFormatter |
If you set the log level at the root level, you are setting the level of all loggers. The following example sets the log level for all loggers to INFO:
.level= INFO
Logger-specific properties provide extra control for the logger of each module. By default, these properties are set to log level FINE in the logging. properties file, however, the lines in the file are commented out. The lines for the loggers might look like this (the modules are indicated in bold):
#javax.enterprise.system.tools.level=FINE #javax.enterprise.system.container.ejb.level=FINE #javax.enterprise.system.core.security.level=FINE #javax.enterprise.system.tools.admin.level=FINE #javax.enterprise.level=FINE #javax.enterprise.system.container.web.level=FINE |
For any given module logger, such as the EJB logger, the global log level can be overridden by the module-specific setting.
In a text editor, uncomment the line that applies to the logger that you want to modify.
Remove the #. The logger is activated using the default level INFO.
Set the property to the desired log level.
Your choices are SEVERE, WARNING, INFO, CONFIG, FINE, FINER, and FINEST.
Save the file.
The log levels are automatically updated.
The following example changes the log level for ConsoleHandler from INFO to FINE
Before:
java.util.logging.ConsoleHandler.level = INFO |
After:
java.util.logging.ConsoleHandler.level = FINE |
The following example sets the log level for the EJB logger to SEVERE (overriding the global level INFO)
Before:
#javax.enterprise.system.container.ejb.level=FINE
After: :
javax.enterprise.system.container.ejb.level=SEVERE