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:
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.
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.
This section describes using the log4j logger to generate log files for Instant Messaging Server.
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.
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:
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 checks 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.
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. For more information, 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.
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.
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.conf file:
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.
On Solaris OS:
imconfutil -c InstantMessaging_home/config/iim.conf.xml set-prop iim.log4j.config=/etc/opt/sun/comms/im/default/config/log4j.conf
On Linux:
imconfutil -c InstantMessaging_home/config/iim.conf.xml set-prop iim.log4j.config=/etc/opt/sun/comms/im/default/config/log4j.conf
Refresh the server.
imadmin refresh
By default, log4j logging is used for all components for which logging information is generated.
To disable log4j logging, set the logging level for the component to OFF in both log4j.conf and log4j.conf.template.
See "Setting log4j Log Levels" for more information.
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.
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 overwriting changes, you should make your changes to both the configuration file and the template.
Open log4j.conf.template.
By default, this file is stored in the InstantMessaging_home/lib directory.
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.
Save and close the log4j.conf.template file.
Repeat the procedure for the configuration file log4j.conf.
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 overwriting changes, you should make your changes to both the configuration file and the template.
Open the log4j.conf.template file.
By default, this file is stored in the InstantMessaging_home/lib directory.
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.
Repeat the procedure for the configuration file log4j.conf.