Skip Headers

Oracle® Communication and Mobility Server Administrator's Guide 10g Release 3 (10.1.3) Part Number E12656-01 |
Home | Contents | Index | Contact Us

Previous | Next
| View PDF

# 12 Configuring the Logging System

This chapter describes the logging framework used by OCMS. This chapter includes the following sections:

- "Overview of Oracle Diagnostic Logging in OCMS"

- "Logging Levels"

- "Setting the Log Levels for Components"

## Overview of Oracle Diagnostic Logging in OCMS

OCMS uses Oracle Diagnostic Logging which is provided with Oracle Application Server. Oracle Diagnostic Logging implements APIs to be used by Oracle products to emit error diagnostics and a LogLoader tool that collects error diagnostic logs for analysis. The interface to Oracle Diagnostic Logging is java.util.logging.

### Logging Components

OCMS defines the following logging components:

- oracle.sdp.ocms.customer: this logger capture all the messages that a customer would like to look at. It follows the XML format of Oracle Diagnostic Logging and it is localized.

- oracle.sdp.ocms.application: this logger will capture all log messages from SIP applications deployed on the server. For example, SipServlet.log().

The remaining logging components are provided for debug purposes only:

- oracle.sdp.ocms.anomalousmsg: this logger captures faulty or unparsable SIP messages. The usable levels are FINE and FINER.

- oracle.sdp.ocms.traffic: this logger captures SIP messages. The usable levels are FINE and FINER.

- oracle.sdp.ocms.config: this logger captures all configuration and system properties.

- oracle.sdp.ocms.statistics and oracle.sdp.sipcluster.util.stat: these loggers capture statistics, such as the number of sent messages.

### Filtering of Logging Information by Single Class Files

The logging framework creates loggers with the above names appended with a fully qualified name of the class that created the logger. This allows developers to filter out logging information at the level of single class files. For example, when a class oracle.sdp.commons.MyClass creates a customer logger, the name of the logger will be:

`"oracle.sdp.ocms.customer.oracle.sdp.commons.MyClass"`

The configuration file contains definitions of the loggers, references to physical log files, and a definition of the trace logger. The trace logger is a logger that is automatically created whenever any of the above loggers are created. For example when a class requests a customer logger through a call to `LogFactory.getLogger`(Class), a trace logger is also created. This allows all customer messages to be written in the trace log and log messages with throwable data to print more information in the trace log.

### Log Files

All base loggers in OCMS (system, anomalousmsg, customer, traffic, config, statistics, application) use a log directory and a log file of their own under the main logging directory sdp. The log file is not configurable, and is an XML file named `log.xml`.

For debug messages a directory called trace is also created.

### Logger Interfaces

The main logging from the SIP Container is to a customer log and a trace log. The customer log contains the localized customer messages, and the trace log is used for debug logging (disabled in a default installation). The customer logger name is oracle.sdp.ocms.system.

The following logger interfaces are implemented:

- oracle.sdp.commons.logging.Logger

- oracle.sdp.commons.logging.CustomerLogger – This interface and oracle.sdp.commons.logging.TraceLogger are the interfaces most classes will use in normal types of logging. It is the only interface where localized messages are used. All other interfaces are considered to be of debug type.

- oracle.sdp.commons.logging.TraceLogger – This interface and oracle.sdp.commons.logging.CustomerLogger are the interfaces most classes will use in normal types of logging. It is the only interface where localized messages are used. All other interfaces are considered to be of debug type.

- oracle.sdp.commons.logging.MessageLogger – Logs messages received and messages sent from the server.

- oracle.sdp.commons.logging.ConfigurationLogger – Logs configuration information at the start-up of a service. For example, coreVersion = "10.1.3.4".

- oracle.sdp.commons.logging.TimerLogger – Logs timing information needed for performance tuning. For example, logging of execution time for a database call.

- oracle.sdp.commons.logging.StatisticsLogger – Logs statistics at regular intervals.

## Logging Levels

The following logging levels are provided:

- SEVERE – These message indicate a serious problem that requires immediate attention from the administrator

- WARNING – These message indicate a potential problem that should be reviewed by the administrator.

- INFO – The INFO level designates informational messages that highlight the progress of the application at a general level. These messages indicate a major life-cycle event, such as the activation or de-activation of a primary sub-component. This is the default log level.

- CONFIG – These messages provide a finer level of granularity for reporting normal events. Enabling logging at this level has a minimal performance impact.

- FINE – These messages provide trace or debug information. Enabling logging at this level may have a small performance impact.

- FINER, FINEST – These logging levels are for debug purposes only and are not recommended for production environments.

## Setting the Log Levels for Components

You can set the logging level of components dynamically through Oracle Application Server Enterprise Manager. Logging configuration changes are picked up automatically every 60 seconds and do not require a server reboot.

To set log levels:

1. In Enterprise Manager select Administration.

2. Select the Go to task icon next to 'Logger Configuration'.

3. In the Logger Configuration page enter the name of the logging interface (for example, 'oracle.sdp.ocms.traffic') in the search field and click Go.

4. Change the logging level as required.

By default, all of the component loggers except for traffic and anomalousmsg are set to INFO. The traffic and anomalousmsg logs are set to OFF. As a consequence, a system using these default settings will not write any messages to the traffic or anomalousmsg logs. Refer to "Logging Levels" for more information.