Log file configuration

Log files grow over time and consume disc space. If no disc space is available components may start failing.

Configure the log files especially for Service Manager server and web tier. The web tier log file configuration depends on the web application server. For instructions, refer to your web application server documentation.

Server log file configuration

The server log file configuration includes the following tasks.

Separate the log files

By default, all servlets running on a host write to a single log file (sm.log) in the logs subdirectory of the Service Manager installation, which is specified in the “log” parameter in the sm.ini file. For more information, see Startup parameter: log.

At least for servlets dedicated for integrations or background processes, you should write a separate log file. To configure this, in the sm.cfg file of the servlet, add to the startup command the “-log” parameter with the log file path relative to the RUN directory.

Here is an example:

sm -startup -log:..\logs\background.log

Tip A common practice is to write a separate log file for each servlet.

Set up log file rotation

As the log files grow large over time, it is recommended to set up log rotation. This guards against a log file size generating disc space shortage. For more information, see Log switching.

When setting up log rotation, calculate the required disc space for all servlets and make sure it is available with a buffer for the unforeseen. For example:

sm -httpPort:13080 -numberoflogfiles:10 -maxlogsize:52428800 -logqueuesize:2000

This command will start a servlet keeping up to 10 log file copies. Log file switch will happen when the log file size reaches 50MB. So the total amount of disc space required for this servlet is 500MB.

The -logqueuesize parameter controls the number of messages buffered in memory before being written to the log file. It helps to avoid performance impact of switching larger log files to user sessions. For more information, see Parameter: logqueuesize.

Activate proactive trace parameters

Review the list of proactive trace parameters, and decide which are helpful to monitor and maintain the administrated system. For details, see Trace parameters that can be proactively activated.

Tip It is recommended to activate only traces whose information is reviewed periodically.

Web tier log file configuration

The web tier log file configuration includes the following.

Web server and web application server logging

Refer to the documentation of the web server and the web application server regarding log file configuration and set it up as appropriate.

Logging for the Service Manager web client application

The Service Manager web client application uses the log.properties configuration file, where you can specify web application specific log parameters.

Related topics

Service Manager maintenance tasks

Configuration tasks