The Directory Proxy Server provides two log file rotation listeners: the copy log file rotation listener and the summarize log file rotation listener, which can be enabled with a log publisher. Log file rotation listeners allow the server to perform a task on a log file as soon as it has been rotated out of service. Custom log file listeners can be created with the Server SDK.
$ dsconfig create-log-file-rotation-listener \ --listener-name "Copy on Rotate" \ --type copy \ --set enabled:true \ --set copy-to-directory:/path/to/archive/directory \ --set compress-on-copy:trueThe path specified by the copy-to-directory property must exist, and the file system containing that directory must have enough space to hold all of the log files that will be written there. The server automatically monitors free disk space on the target file system and generates administrative alerts if the amount of free space gets too low.
$ dsconfig create-log-file-rotation-listener \ --listener-name "Summarize on Rotate" \ --type summarize \ --set enabled:true \ --set output-directory:/path/to/summary/directoryThe summary output files have the same name as the rotated log file, with an extension of .summary. If the output-directory property is specified, the summary files are written to that directory. If not specified, files are placed in the directory in which the log files are written.
As with the copy log file rotation listener, summary files are not automatically deleted. Although files are generally small in comparison to the log files themselves, make sure that enough space is available in the specified storage directory. The server automatically monitors free disk space on the file system to which the summary files are written.