Skip Headers
Oracle® Communications Instant Messaging Server System Administrator's Guide
Release 9.0.2

E52523-01
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

14 Managing Logging for Instant Messaging Server

This chapter provides information about Oracle Communications Instant Messaging Server logging. Instant Messaging Server implements log4j and includes logging for the server, the calendar agent, the watchdog, the multiplexor, the gateway connector, the XMPP/HTTP gateway (see "Configuring the HTTPBIND Gateway"), and other features. For information about log4j, see:

http://logging.apache.org

Instant Messaging Server Log File Location

You specify the location of the log files when you run the configure utility after installing Instant Messaging Server. Typically, log files are stored in the InstantMessaging_runtime/log directory. See "Configuration File and Directory Structure Overview" for information on the location of InstantMessaging_runtime.

If you are using log4j for log file generation in your deployment, the logger will also use the directory you specify during configuration as the base directory in which to store log4j logs.

Instant Messaging Server Component Logging Levels

The level or priority of maintaining the error log defines how detailed, or verbose, the log should be. A higher priority level implies less details as only events of high priority (high severity) are recorded in the log file. In contrast a lower priority level implies greater details as more events are recorded in the log file.

You can set the logging level separately for each component.

Table 14-1 describes the logging levels for the components. These logging levels are a subset of the levels defined by the UNIX syslog facility.

Table 14-1 Logging Levels for Instant Messaging Server Components

Level Description

FATAL

This priority level records minimum logging details in the log file. A log record is added to the log file whenever a severe problem or critical condition occurs. If a FATAL problem occurs, the application might stop functioning.

ERROR

A log record is added to the log file whenever a recoverable software error condition occurs or a network failure is detected. For example, when the server fails to connect to a client or to another server.

WARNING

A log record is added to the log file whenever a user error is detected. For example, when the server cannot understand the communication sent by the client.

INFO

A log record is added to the log file whenever a significant action takes place. For example, when an end user successfully logs in or logs out.

DEBUG

The tasks are recorded in the log file. This information is useful for debugging purposes only. Each event with individual steps, within each process or task, is written in the log file. The information recorded helps the end user identify the problems while debugging the application.


When you select a particular logging level, events corresponding to that level and to all higher and less verbose levels are logged.

INFO is the default level for the server. ERROR is the default level for the multiplexor, Calendar agent, and watchdog log files.

Managing Instant Messaging Server Logging by Using log4j

When you install Instant Messaging Server, a template file (log4j.conf.template) for the log4j configuration file is installed into the InstantMessaging_home/lib directory.

When you run the configure utility after installation, the template is used to create the log4j configuration file (log4j.conf) in the InstantMessaging_cfg directory. This configuration file is used to determine where to store log files generated by log4j, the logging level to use for various components, the output syntax, and to determine what log files to generate.

This section describes using the log4j logger to generate log files for Instant Messaging Server in the following sections:

The logging levels described in "Instant Messaging Server Component Logging Levels" are used by the log4j logger.

For more information about log4j, and instructions on configuring aspects of log files, such as size, number of backups, and so on, see Apache Logging Services at:

http://logging.apache.org

Instant Messaging Server Log4j Configuration File (log4j.conf) Location

You can change the location of the log4j configuration file, log4j.conf, by using the imconfutil command to modify the iim.log4j.config configuration property. If you do not specify a value for this parameter, the logger looks in the InstantMessaging_cfg directory. If the logger does not find the log4j configuration file in that directory, it uses the logging configuration properties to generate non-log4j style logs.

See "Configuration File and Directory Structure Overview" for information on locating InstantMessaging_cfg.

Instant Messaging Server Log4j Log File Syntax

The configure utility generates the log4j configuration file (log4j.conf) based on the content of the log4j configuration file template (log4j.conf.template). In the template:

  • ${logdir} corresponds to the directory in which you want to store log files, as specified during configuration. See "Instant Messaging Server Log File Location".

  • Appenders are identified by IDs of the form Ax, where x is an integer, for example, log4j.appender.A2.maxFileSize=5mb.

  • There are separate sections for configuring logging for different types of data. Each section starts with an initial property of the form log4j.logger.identifier, for example: log4j.logger.agent-calendar. The following identifiers for types of logging are available:

    • xmppd - Generates xmppd.log, which contains logging information for the server.

    • iim_wd - Generates wd.log, which contains information for the watchdog.

    • xmppd.xfer - Generates xfer.log, which is only for XMPP traffic.

    • agent-calendar - Generates logging information for the Calendar agent.

    • net.outer_planes.jso.BasicStream - Generates jso.log, which contains information for Jabber stream objects. For more information, see:

    • http://jso.jabberstudio.org

    • muxd - Generates muxd.log, which contains logging information for the multiplexor.

    • smppbind - Generates smppbind.log,which contains logging information for the SMS Gateway.

    • router - Generates relay.log,which contains logging information for shoal relay.

    • gwcd - Generates gwcd.log, which contains logging information for the Gateway Connector.

Log4j Log Levels for Instant Messaging Server Components

The log4j logger uses the same logging levels described for configuration property-based logging mechanism in "Instant Messaging Server Component Logging Levels".

To Specify the Location of the Log4j Configuration File (Log4j.conf)

  1. Use the imconfutil command to set the iim.log4j.config configuration property to the path in which you want the logger to look for log4j.conf.

    For example:

    Solaris OS:

    imconfutil -c /opt/sun/comms/im/config/iim.conf.xml set-prop iim.log4j.config=/etc/opt/sun/comms/im/default/config/log4j.conf
    

    Red Hat Linux and Oracle Linux:

    imconfutil -c /opt/sun/comms/im/config/iim.conf.xml set-prop iim.log4j.config=/etc/opt/sun/comms/im/default/config/log4j.conf
    
  2. Refresh the server.

    imadmin refresh
    

To Enable or Disable Log4j Logging for an Instant Messaging Server Component

By default, log4j logging is used for all components for which logging information is generated.

  1. To disable log4j logging, set the logging level for the component to OFF in both log4j.conf and log4j.conf.template.

    See "To Set Log4j Log Levels for Instant Messaging Server" for more information.

  2. To enable log4j logging, set the logging level for the component to any logging level other than OFF in both the log4j.conf and log4j.conf.template files.

To Set Log4j Log Levels for Instant Messaging Server

You can set log levels by modifying either the template or the log configuration file. However, if you only modify the configuration file, any changes you make are overwritten the next time you run configure. To prevent this, you should make your changes to both the configuration file and the template.

  1. Open log4j.conf.template.

    By default, this file is stored in the InstantMessaging_home/lib directory.

  2. For each component, specify the logging level you want to use.

    For example, to set the log level for the server:

    log4j.logger.xmppd=log-level
    

    where log-level is one of FATAL, ERROR, WARNING, INFO, or DEBUG.

    See "Logging Levels for Instant Messaging Server Components" for detailed information on each of these logging levels.

  3. Save and close the log4j.conf.template file.

  4. Repeat the procedure for the configuration file log4j.conf.

To Specify the Maximum Log4j Log File Size for IM Server Components

You can set log levels by modifying either the template or the log configuration file. However, if you only modify the configuration file, any changes you make will be overwritten the next time you run configure. To prevent this, you should make your changes to both the configuration file and the template.

  1. Open the log4j.conf.template file.

    By default, this file is stored in the InstantMessaging_home/lib directory.

  2. For each component, specify the maximum size for the component's log file.

    For example, to set the size for the server log file:

    log4j.appender.A1.maxFileSize=max-logfile-size
    

    where A1 is the default appender ID for the server, max-logfile-size is in MB, for example 5MB.

  3. Repeat the procedure for the configuration file log4j.conf.