Sun Java System Access Manager Policy Agent 2.2 Guide for Microsoft Internet Information Services 5.0

Log Rotation

Starting with this release of web agents, when the current log file reaches a specific size, a new log file is created. Log information is then stored in the new log file until it reaches the size limit. This default behavior is configurable. Therefore, log rotation can be turned off and the size limit can be changed.


Note –

The type of information stored in log files has not changed in Policy Agent 2.2. The following types of information are logged:

The troubleshooting, or diagnostic, information is stored in log files, locally, with the web agent. The access denied and access allowed information, which is often referred to as audit-related information, can be stored both locally and with Access Manager.

Configuration that relates to the local log files is performed in the web agent AMAgent.properties configuration file. Configuration that relates to the audit related logs stored with Access Manager is performed in the Access Manager AMConfig.properties configuration file.

The log rotation described in this section refers to logs that store troubleshooting information locally.


Log rotation is controlled by the following configuration property in the web agent AMAgent.properties configuration file:

com.sun.am.policy.agents.config.local.log.rotate

Log rotation occurs automatically since the default value of this property is true. When this property is set to false, no rotation takes place for the local log file.

The following example shows this configuration property set to true:

com.sun.am.policy.agents.config.local.log.rotate = true

The following properties are also related to log rotation:

The following code example demonstrates how to set the property that controls log file size so that a new log file is created when the current log file reaches a specific size.

com.sun.am.policy.agents.config.local.log.size: n

Where n represents the size of a file in bytes. The file size should be a minimum of 3000 bytes. The default size is 10 megabytes.


Note –

By default, the log file size property is not exposed in the web agent AMAgent.properties configuration file. If you want to change the default size, add a line to the file setting this property to the file size desired.


When a new log file is created an index appends to the name of the log file as such:

amAgent-1
amAgent-2

Where amAgent represents the fully qualified path name to the log files excluding the appended number. The numbers 1 and 2 represent the appended number. The appended number indicates the chronological order in which information of a given size was filed away into its respective log file. There is no limit to the number of log files that can be rotated.

Benefit - Log Rotation: Prior to this release of web agents, all logging messages were written to the same log file. However, saving all log information to a single log file has the potential of exhausting disk space. The log rotation feature solves this problem.