Sun GlassFish Message Queue 4.4 Developer's Guide for Java Clients

Logging Name Spaces, Levels, and Activities

The Message Queue provider defines a set of logging name spaces associated with logging levels and logging activities that allow Message Queue clients to log connection and session events when a logging configuration is appropriately set.

The root logging name space for the Message Queue client runtime is defined as javax.jms. All loggers in the Message Queue client runtime use this name as the parent name space.

The logging levels used for the Message Queue client runtime are the same as those defined in the java.util.logging.Level class. This class defines seven standard log levels and two additional settings that you can use to turn logging on and off.

OFF

Turns off logging.

SEVERE

Highest priority, highest value. Application-defined.

WARNING

Application-defined.

INFO

Application-defined.

CONFIG

Application-defined

FINE

Application-defined.

FINER

Application-defined.

FINEST

Lowest priority, lowest value. Application-defined.

ALL

Enables logging of all messages.

In general, exceptions and errors that occur in the Message Queue client runtime are logged by the logger with the javax.jms name space.

The following tables list the events that can be logged and the log level that must be set to log events for JMS connections and for sessions.

The following table describes log levels and events for connections.

Table 3–6 Log Levels and Events for javax.jms.connection Name Space

Log Level 

Events 

FINE

Connection created 

FINE

Connection started 

FINE

Connection closed 

FINE

Connection broken 

FINE

Connection reconnected 

FINER

Miscellaneous connection activities such as setClientID

FINEST

Messages, acknowledgments, Message Queue action and control messages (like committing a transaction)  

For sessions, the following information is recorded in the log record.

The table below describes log levels and events for sessions.

Table 3–7 Log Levels and Events for javax.jms.session Name Space

Log Level 

Event 

FINE

Session created 

FINE

Session closed 

FINE

Producer created 

FINE

Consumer created 

FINE

Destination created 

FINER

Miscellaneous session activities such as committing a session. 

FINEST

Messages produced and consumed. (Message properties and bodies are not logged in the log records.) 

By default, the output log level is inherited from the JRE in which the application is running. Check the JRE_DIRECTORY/lib/logging.properties file to determine what that level is.

You can configure logging programmatically or by using configuration files, and you can control the scope within which logging takes place. The following sections describe these possibilities.