Log Rotation Settings
The idea of log rotation is as follows. Active log files can be handled daily, weekly, monthly, or when some log file grows too large (the maximal size can be restricted). Before being handled, the active log file is removed from logging and a new one is created. Plesk starts logging to the new log file, while the dropped-out log file is handled, compressed, and emailed to some address (if this action is specified). The handled log files are stored on the server. The number of such stored files is limited. Once the limit is exceeded, the oldest file is removed from the server and a new handled log file is added.
Log rotation settings are specified in the log-rotation node defined by complex type LogRotationType (
domain_template.xsd). It is structured as follows:
- The off node is required if the on node is not specified. This node disables log rotation on a subscription created using this service plan. Data type: none.
- The on node is required if the off node is not specified. This node enables log rotation on a subscription created using this service plan. Data type: none.
- The log-condition type is required if the on node is specified. Specifies the criterion for triggering log rotation on a subscription. Data type: none.
- The log-bysize type is required if the on node is specified and the log-bytime node is not. Indicates that log files should be handled once the specified size (in Kb) is achieved. Data type: integer.
- The log-bytime type is required if the on node is specified and the log-bysize node is not. Indicates that log files should be handled periodically. Data type: string. Allowed values: Daily | Weekly | Monthly.
- The log-max-num-files node is optional. Specifies the maximal number of handled log files belonging to the subscription that can be stored on the server. Data type: integer.
- The log-compress node is optional. Enables/disables log file compression. Data type: Boolean.
- The log-email node is optional. Specifies the email address to which the handled log file can be sent. Data type: string.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Leave your feedback on this topic here
If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.