Page created: 26 Jul 2021 |
Page updated: 14 Jan 2022
The Directory Server allows you to configure the log retention policy for each log on the server.
When a retention limit is reached, the Directory Server removes the oldest archived log before creating a new log. Log retention is only effective if you have a log rotation policy in place.
If you create a new log publisher, you must configure at least one log retention policy.
- File Count Retention Policy
- Sets the number of log files you want the Directory Server to retain. The default file count is 10 logs. If the file count is set to 1, then the log continues to grow indefinitely without being rotated.
- Free Disk Space Retention Policy
- Sets the minimum amount of free disk space. The default free disk space is 500 MBytes.
- Size Limit Retention Policy
- Sets the maximum size of the combined archived logs. The default size limit is 500 MBytes.
- Time Limit Retention Policy
- Sets the maximum length of time that rotated log files should be retained.
- Custom Retention Policy
- Create a new retention policy that meets your Directory Server’s requirements. This requires developing custom code to implement the desired log retention policy
- Never Delete Retention Policy
- Used in a rare event that does not require log deletion.
Use dsconfig to modify the log retention policy for the access
$ bin/dsconfig set-log-publisher-prop \ --publisher-name "File-Based Access Logger" \ --set "retention-policy:Free Disk Space Retention Policy"