Log retention policy
- Last UpdatedMay 21, 2024
- 2 minute read
For general information about records retention policies, see Set your record retention policies.
The logRetentionPolicies task in the maintenanceTasks section of the application configuration file determines when log records are deleted. By default, the log records are deleted every 24 hours at 7:00 a.m.
The following table describes the task parameters.
logRetentionPolicies task parameters
|
Parameters |
Description of Parameter |
Default value |
|---|---|---|
|
|
Name of the log records retention task. Do not change this value. |
|
|
|
Frequency with which the task is run. Use PI Time to specify units of time. and together determine when the task is done. |
|
|
|
Time that logRetentionPolicies task is run. Use PI Time to specify units of time. and together determine when the task is done. |
|
Log retention policy
The policy in the logRetentionPolicies section determines which log records are deleted. The oldest records are deleted first.
Note: If the policy is deleted, then the log records are kept indefinitely.
You can delete log records based on any combination of the following:
-
The age of the records
-
The number of records
-
The total size of all records
The default policy deletes log records older than two months, keeps the number of records to 100,000 or less, and keeps the maximum size of the log records to 1000 MB or less.
Note: Every time the scheduled deletion successfully deletes any number of records, the policy will also perform an automatic shrink operation on the database to reduce its size.
logRetentionPolicies policy parameters
|
Parameter |
Description of Parameter |
Default value |
|---|---|---|
|
|
Name of the policy. |
|
|
|
Maximum age of log records specified in months. Used with and to determine which log records are deleted. |
|
|
|
Maximum number of rows of log data. Used with and to determine which log records are deleted. |
|
|
|
Maximum size of all log records, specified in megabytes (MB). Used with and to determine which log records are deleted. |
|