Sun GlassFish Enterprise Server v3 Prelude Administration Guide

ProcedureTo Set Logger-Specific Properties

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.

  1. 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.

  2. Set the property to the desired log level.

    Your choices are SEVERE, WARNING, INFO, CONFIG, FINE, FINER, and FINEST.

  3. Save the file.

    The log levels are automatically updated.


Example 9–4 Changing the Log Level for the Console Handler

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


Example 9–5 Setting a Log Level for a Specific Logger

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