Directory Server supports rotating and deleting logs not only after a specified interval, but also at a specified time. This feature lets you more easily perform operations such as log analysis and trending, as each rotated log file covers the same length of time. This feature can also be used to meet auditing and security requirements because it makes it easier to determine the specific period of time covered by a given log file.
You can specify whether to rotate the log according to a time interval or according to the size of the log file. The following figure illustrates using the DSCC to configure log rotation to occur once a week at midnight, as well as to rotate the log files when the size limit exceeds 100 Mbytes.
See the log(5dsconf) man page for details on the rotation-time log property.
For example, from the command line, you can display the current configuration for the access log as follows:
$ dsconf get-log-prop -p 20390 enabled : on level : default max-age : 1M max-disk-space-size : 500M max-file-count : 10 max-size : 100M min-free-disk-space-size : 5M path : /install-path/sA1/logs/access perm : 600 rotation-interval : 1d rotation-min-file-size : unlimited rotation-time : undefined verbose-enabled : N/A
You can change the rotation interval for the access log through the command line as follows:
$ dsconf set-log-prop -p 20390 rotation-interval:2d