Sun GlassFish Communications Server 2.0 Administration Guide

Chapter 19 Configuring Logging

This chapter briefly describes how to configure logging and view the server log. It contains the following sections:

About Logging

Log Records

The Communications Server uses the Java EE platform Logging API specified in JSR 047. Communications Server logging messages are recorded in the server log, normally found at domain-dir/logs/server.log. When a log is rotated, Communications Server creates a new, empty file named server.log and renames the old file server.log_date, where date is the date and time when the file was rotated.

The components of the Communications Server generate logging output. Application components can also generate logging output.

Application components may use the Apache Commons Logging Library to log messages. The platform standard JSR 047 API, however, is recommended for better log configuration.

Log records follow a uniform format:

[#|yyyy-mm-ddThh:mm:ss.SSS-Z|Log Level|ProductName-Version|LoggerName|Key Value Pairs|Message|#]

For example:

[#|2006-10-21T13:25:53.852-0400|INFO|sun-appserver9.1|javax.enterprise.
system.core|_ThreadID=13;|CORE5004: Resource Deployed: 
[cr:jms/DurableConnectionFactory].|#]

In this example,

The log record format might be changed or enhanced in future releases.

Module Log Levels

The Communications Server provides a logger for each of its modules.


asadmin> get server-config.log-service.module-log-levels.*
server-config.log-service.module-log-levels.admin = INFO
server-config.log-service.module-log-levels.classloader = INFO
server-config.log-service.module-log-levels.cmp = INFO
server-config.log-service.module-log-levels.cmp-container = INFO
server-config.log-service.module-log-levels.configuration = INFO
server-config.log-service.module-log-levels.connector = INFO
server-config.log-service.module-log-levels.corba = INFO
server-config.log-service.module-log-levels.deployment = INFO
server-config.log-service.module-log-levels.ejb-container = INFO
server-config.log-service.module-log-levels.group-management-service = INFO
server-config.log-service.module-log-levels.javamail = INFO
server-config.log-service.module-log-levels.jaxr = INFO
server-config.log-service.module-log-levels.jaxrpc = INFO
server-config.log-service.module-log-levels.jdo = INFO
server-config.log-service.module-log-levels.jms = INFO
server-config.log-service.module-log-levels.jta = INFO
server-config.log-service.module-log-levels.jts = INFO
server-config.log-service.module-log-levels.management-event = INFO
server-config.log-service.module-log-levels.mdb-container = INFO
server-config.log-service.module-log-levels.naming = INFO
server-config.log-service.module-log-levels.node-agent = INFO
server-config.log-service.module-log-levels.property.ar = INFO
server-config.log-service.module-log-levels.property.clb = INFO
server-config.log-service.module-log-levels.property.sip = INFO
server-config.log-service.module-log-levels.property.smi = INFO
server-config.log-service.module-log-levels.property.ssr = INFO
server-config.log-service.module-log-levels.resource-adapter = INFO
server-config.log-service.module-log-levels.root = INFO
server-config.log-service.module-log-levels.saaj = INFO
server-config.log-service.module-log-levels.security = INFO
server-config.log-service.module-log-levels.self-management = INFO
server-config.log-service.module-log-levels.server = INFO
server-config.log-service.module-log-levels.synchronization = INFO
server-config.log-service.module-log-levels.util = INFO
server-config.log-service.module-log-levels.verifier = INFO
server-config.log-service.module-log-levels.web-container = INFO

Configuring Logging

This section contains the following topics:

Configuring General Logging Settings

To configure the general logging settings using the Admin Console:

On the General page, enter appropriate values to customize logging to your requirements. Stop and restart the Communications Server.

For details on setting the various configuration parameters, click Help in the Admin Console.

To configure these log settings in asadmin, use the get and set commands.

Configuring Log Levels

To configure log levels using the Admin Console:

Set the log level for the modules listed on this page. Use the Additional Properties area to configure log levels for any application loggers. For a list of the module loggers, see Module Log Levels.

For details on setting the various configuration parameters, click Help in the Admin Console.

To configure these log settings in asadmin, use the get and set commands.

For example, to set the logging level of the SIP container to FINE, use the following set command:

asadmin set server-config.log-service.module-log-levels.property.sip=FINE

SIP Message Inspection

SIP Message Inspection feature helps troubleshoot SIP traffic through Communications Server. It is activated by setting the SMI log domain to level FINE.

ProcedureTo Activate SIP Message Inspection Using the Admin Console

  1. Open the Admin Console in a browser.

  2. For the developer profile, go to Application Server -> Logging -> Log Levels. For the cluster profile, go to Configurations -> Configuration -> Logging -> Logging Settings -> Log Levels.

  3. In the Log Levels page, in the Additional Properties section, set the smi proerty to FINE.

ProcedureTo Activate SIP Message Inspection Using the Admin CLI

  1. Open the asadmin utility in a terminal window.

  2. Use the following command:

    asadmin set server-config.log-service.module-log-levels.property.smi=FINE

Viewing Server Logs

To view the log files:

Use the options provided in the Search Criteria area to display log results based on your preferences.