Previous Topic: Custom Error Pages ParametersNext Topic: Configuring Proxy Rules


Configuring the CA SiteMinder® SPS Log Settings

CA SiteMinder® SPS logger.properties File Overview

The CA SiteMinder® SPS log settings are configured through the logger.properties file. These settings in the file are groups of name/value pairs or directives that the CA SiteMinder® SPS reads at run time. You can update the logger.properties file without restarting the SPS.

The following is the default location of the logger.properties file:

sps_home/Tomcat/properties

Modifying the logger.properties File

The log settings for the CA SiteMinder® SPS are maintained in the logger.properties file located in the following directory:

sps_home/Tomcat/properties

Follow these steps:

  1. Open the file in a text editor.
  2. Edit the directives, as necessary.
  3. Save the file.

The log settings are changed.

Logging Settings

The logger.properties file contents are grouped into the following sections:

The directives contained in this file follow the format name=value. Any lines beginning with the # symbol are comments, and are not read when the CA SiteMinder® SPS loads configuration settings.

Note: Pathnames on Windows systems use double backslashes (\\).

SvrConsoleAppender Settings

The SvrConsoleAppender Settings section contains settings for logging events on to a console. This section has the following format:

# SvrConsoleAppender is set to be a ConsoleAppender. 
log4j.appender.SvrConsoleAppender=org.apache.log4j.ConsoleAppender
log4j.appender.SvrConsoleAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.SvrConsoleAppender.layout.ConversionPattern=<log_message_display_format_on_console>  
log_message_display_format_on_console

Specifies the display format of a log message on the console. The product supports all the log4j date pattern strings.

Default Value: [%d{dd/MMM/yyyy:HH:mm:ss-SSS}] [%p] - %m%n

SvrFileAppender Settings

The SvrFileAppender Settings section contains settings for logging events in a file. This section has the following format:

# SvrFileAppender is set to be a FileAppender. 
log4j.appender.SvrFileAppender=org.apache.log4j.FileAppender
log4j.appender.SvrFileAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.SvrFileAppender.layout.ConversionPattern=<log_message_display_format_in_file>
log_message_display_format_in_file

Specifies the display format of a log message in the file. The product supports all the log4j date pattern strings.

Default Value: [%d{dd/MMM/yyyy:HH:mm:ss-SSS}] [%p] - %m%n

Log Settings

The server log settings section contains settings for enabling and disabling logging, setting logging level, and setting the output format of the log messages. This section has the following format:

# Server.conf settings:
# details of setting "log4j.rootCategory":
# For First attribute:
# Depending on the logging level needed, set the appropriate level
# Possible values : OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL
# For Second attribute:
# if you want to enable log console, then add SvrConsoleAppender, else don't  add this.
# For Third attribute:
# if you want to enable logging into file, theb add SvrFileAppender, else don't add this.
log4j.rootCategory=<log_level>,<output_format>
log level

Specifies the log level of a message. The following list displays the possible values in the increasing order of priority:

If the value is set to OFF, logging is disabled. If the value is set to any other value, logging is enabled.

Default: INFO

output format

Specifies how a log message is displayed. You can display a log message on a console, or store it in a file, or both.

Default: SvrFileAppender

For example, if the log level is INFO and you want to display a log message on a console and store it in a file, use the following command:

log4j.rootCategory=INFO,SvrConsoleAppender,SvrFileAppender

Log Rolling Settings

The server log rolling Settings section contains settings for enabling log rolling. You can enable log rolling based on one of the following mechanisms:

This section has the following format:

# Enable the below setting only if file logging is enabled above. if not make it as an comment by adding "#" at the begging of the line.
log4j.appender.SvrFileAppender.File=<logfile_path>
# Enable this only if file logging is enabled above.
# set vale to "true" if messages are to be appended to the existing file. else set to "false"
log4j.appender.SvrFileAppender.Append=true|false
#Configurations to rollover server log file based on file size
log4j.appender.SvrFileAppender=org.apache.log4j.RollingFileAppender
log4j.appender.SvrFileAppender.MaxFileSize=<maximum_logfile_size>
log4j.appender.SvrFileAppender.MaxBackupIndex=<maximum_number_of_logfile>

The Log Rolling Based on File Size section contains the following settings for enabling log rolling based on a file size:

logfile path

Specifies the name and path of the log file.

Default Name: server.log

Default Path: install_dir_home/secure-proxy/proxy-engine/logs/

true|false

Specifies how the system manages the log file. If this value is set to true, the system appends new log messages to the existing log file when it starts. If this value is set to false, the system rolls over the existing log file and creates a log file for new log messages when it starts.

Default Value: true

MaxFileSize

Specifies the maximum size of the log file after which the system must create a new log file.

Default Value: 1 MB

MaxBackupIndex

Specifies the maximum number of log files that the system creates. If the number of log files exceeds the maximum number that is specified, the system deletes the oldest log file and creates a new log file.

Default Value: 10

The Log Rolling Based on File Age section contains the following settings for enabling log rolling based on a file age:

date_pattern

Specifies the date when the system must create a new log file.

Default: yyyy-MM-dd

A new log file is created in the following format:

<logfile_name>.<date_format> 
logfile_name

Specifies the name of the log file.

Default: server.log

date_format

Specifies the date when the log file was created. The file supports all the log4j date pattern strings.

Default: yyyy-MM-dd

Modify ServerPath in WebAgent.conf for Logging

If you configure a Web Agent for virtual hosts, each host must have its own Web Agent cache, log file, and health monitoring resources. To help ensure that resources are unique, configure the ServerPath parameter.

The ServerPath parameter specifies a unique identifier for the Web Agent resources of cache, logging, and health monitoring. For each server instance to have its own set of these Agent resources, the value of the ServerPath parameter must be unique.

For example, you can set the ServerPath parameter to the directory where the web server log file is stored, such as server_instance_root/logs.

If you have virtual hosts in your environment, verify that the ServerPath parameter is in each WebAgent.conf file.

To verify that the ServerPath parameter is in each WebAgent.conf file

  1. Navigate to the WebAgent.conf file in the directory sps_home\secure-proxy\proxy-engine\conf\defaultagent.
  2. Open the file.
  3. Check that the ServerPath setting is configured to a unique string or path.

    For Windows, you can specify any unique string. For UNIX, specify a unique system path.

  4. Save the WebAgent.conf file.