Note: this component is designated "advanced", which means that objects of this type are not expected to be created or altered in most environments. If you believe that such a change is necessary, you may want to contact support in order to understand the potential impact of that change.
The Copy Log File Rotation Listener may be used to copy a log file to an alternate location as soon as it has been rotated, optionally compressing the file as it is copied.
The original copy of the rotated log file will be left unaltered, and will remain so until it is removed in accordance with the log retention policy. The copy will not be subject to removal by the log retention policy, so some other process must be in place to ensure that it will be removed after it is no longer needed, and that there will always be sufficient space on the target filesystem. The server will automatically monitor the amount of free space on the filesystem targeted by the copy-to-directory in the same way that it does for other components like log files and backend databases.
The Copy Log File Rotation Listener component inherits from the Log File Rotation Listener
The properties supported by this managed object are as follows:
Basic Properties: | Advanced Properties: |
---|---|
description | None |
enabled | |
copy-to-directory | |
compress-on-copy |
Description | A description for this Log File Rotation Listener |
Default Value | None |
Allowed Values | A string |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Indicates whether the Log File Rotation Listener is enabled for use. |
Default Value | None |
Allowed Values | true false |
Multi-Valued | No |
Required | Yes |
Admin Action Required | None. Modification requires no further action |
Description | The path to the directory to which log files should be copied. It must be different from the directory to which the log file is originally written, and administrators should ensure that the filesystem has sufficient space to hold files as they are copied. |
Default Value | None |
Allowed Values | A filesystem path |
Multi-Valued | No |
Required | Yes |
Admin Action Required | None. Modification requires no further action |
Description | Indicates whether the file should be gzip-compressed as it is copied into the destination directory. |
Default Value | false |
Allowed Values | true false |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
To list the configured Log File Rotation Listeners:
dsconfig list-log-file-rotation-listeners [--property {propertyName}] ...
To view the configuration for an existing Log File Rotation Listener:
dsconfig get-log-file-rotation-listener-prop --listener-name {name} [--tab-delimited] [--script-friendly] [--property {propertyName}] ...
To update the configuration for an existing Log File Rotation Listener:
dsconfig set-log-file-rotation-listener-prop --listener-name {name} (--set|--add|--remove) {propertyName}:{propertyValue} [(--set|--add|--remove) {propertyName}:{propertyValue}] ...
To create a new Copy Log File Rotation Listener:
dsconfig create-log-file-rotation-listener --listener-name {name} --type copy --set enabled:{propertyValue} --set copy-to-directory:{propertyValue} [--set {propertyName}:{propertyValue}] ...
To delete an existing Log File Rotation Listener:
dsconfig delete-log-file-rotation-listener --listener-name {name}