Previous Topic: Configure the Virtual Host SettingsNext Topic: Configure Proxy Rules


Configure Log Settings

You can configure the CA SiteMinder® SPS and HttpClient log settings.

Configure CA SiteMinder® SPS Logs

You can configure the server log settings and log rolling settings manually or using Administrative UI.

To configure manually, perform the following steps:

  1. Navigate to the following location:
    sps_home/Tomcat/properties
    
  2. Open the logger.properties file.
  3. To log events on a console, navigate to the SvrConsoleAppender section and set the following parameter:
    log_message_display_format_on_console

    Defines the display format of a log message on the console. You can define any log4j date pattern strings.

  4. To log events in to a file, navigate to the SvrFileAppender section and set the following parameter:
    log_message_display_format_in_file

    Defines display format of a log message in the file. You can define any log4j date pattern strings.

  5. Configure the following fields to define the logging settings:
    log level

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

    • OFF
    • FATAL
    • ERROR
    • WARN
    • INFO
    • DEBUG
    • ALL

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

    output format

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

    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
    
  6. Perform one of the following steps:
  7. Save the changes.

To configure using Administrative UI, perform the following settings:

  1. Navigate to Administration, Logger.
  2. Configure the following settings to define the logging settings:
    Log to File

    Specifies that the logs must be stored in a file. Select this option if you want to log messages in a file. By default, this option is enabled.

    Log Level

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

    • OFF
    • FATAL
    • ERROR
    • WARN
    • INFO
    • DEBUG
    • ALL

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

    File Log Pattern

    Defines the display format of a log message in the file. You can define any log4j date pattern strings.

  3. To define log rolling based on file size, configure the following fields:
    Append to Log File

    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.

    Log Rotation Type

    Specifies the log rolling mechanism.

    Maximum File Size

    Specifies the maximum size of the log file after which a new log file is created. This option is displayed only if you selected Log Rotation Type as onFileSize.

    Maximum Backup Index

    Defines the maximum number of log files that must be created. If the number of log files exceeds the maximum number that is specified, the oldest log file is deleted and a new log file is created. This option is displayed only if you select Log Rotation Type as onFileSize.

    Rollover Schedule

    Specifies the class name that defines the rollover schedule based on the selected log rotation type.

    Default for OnAge Log Rotation Type: org.apache.log4j.DailyRollingFileAppender

    Default for OnSize Log Rotation Type: org.apache.log4j.DailyRollingFileAppender

  4. To define log rolling based on file age, configure the following fields:
    Date Pattern

    Specifies the date when a logfile must be created. You can define any log4j date pattern strings. This option is displayed only if you select Log Rotation Type as onAge.

    Log File Name

    Specifies the name of the log file.

  5. Click Save.

Configure HttpClient Logging

We recommend that you enable HttpClient logging only for debugging. In a production environment, enabling logging can cause performance degradation.

To configure the settings manually, perform the following settings:

  1. Open the server.conf file.
  2. Navigate to the <Server> section and set the httpclientlog value to yes.
  3. Save the change.
  4. Navigate to the following location:
    sps_home\Tomcat\properties
    
  5. Open the httpclientlogging.properties file.
  6. Configure the following parameters:
    java.util.logging.FileHandler.formatter

    Defines the name of the formatter class

    Limits:

    java.util.logging.SimpleFormatter — writes brief summaries of log records
    
    java.util.logging.XMLFormatter — writes detailed descriptions in XML format
    
    java.util.logging.FileHandler.pattern

    Defines the name of the HttpClient log file.

    Limits:

    sps_home\proxy-engine\logs\httpclient%g.log
    

    %g represents the generation number of the rotated log file.

    java.util.logging.FileHandler.count

    Specifies the number of output files in a cycle.

    java.util.logging.FileHandler.limit

    Specifies an approximate maximum number of bytes to write to any on log file.

    Limits: If set to zero, there is no limit.

  7. Save the changes.

To configure using Administrative UI, perform the following steps:

  1. Navigate to Administration, Logger.
  2. Complete the following fields in the Http Client Logging section:
    Maximum File Size

    Defines the maximum number of bytes to write to any on log file.

    Maximum Backup Index

    Specifies the number of output files in a cycle.

    Wire Level

    Defines the log level of the wire log.

    Log File Name

    Defines the file name of the HttpClient log file.

    Formatter Class Name

    Specifies the name of the formatter class.

    Limits:

    java.util.logging.SimpleFormatter — writes brief summaries of log records

    java.util.logging.XMLFormatter — writes detailed descriptions in XML format

  3. Click Save.