Oracle GlassFish Server 3.0.1 Administration Guide

ProcedureTo Set Module Logger Levels

A module log level specifies which kinds of events are logged for a particular logger. The default level for message output to the console is INFO (which also includes SEVERE and WARNING messages). The global log level is overridden by a module-specific log level.

By default, the module log level is set to FINE. 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

Because setting log levels is a dynamic operation, you do not need to restart GlassFish Server for changes to take effect.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List the existing module loggers by using the list-logger-levels(1) subcommand.

  3. Set the log level for a module by using the set-log-level(1) subcommand.

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


Example 7–3 Setting the Log Level for a Module Logger

This example sets the log level for the web container logger to FINE.


asadmin> set-log-level javax.enterprise.system.container.web.level=FINE
Command set-log-level executed successfully.


Example 7–4 Setting Log Levels for Multiple Loggers

This example sets the log level for security and web container loggers.


asadmin> set-log-level javax.enterprise.system.core.security.level=FINE
javax.enterprise.system.container.web=WARNING 
Command set-log-level executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help set-log-level at the command line.