As catalina.out is Tomcat's log, Artifactory doesn't have any control over its rotation.
However, on a Linux OS you can do the following:
- Create a configuration file in the following path: /etc/logrotate.d/ . For example: /etc/logrotate.d/tomcat
- Insert the following to the above file:
The following parameters are used for:
- copytruncate – truncates the original log file in place after creating a copy, instead of moving the old log file and optionally creating a new one.
- daily – rotate the log every day.
- rotate – how many rotation logs to keep.
- compress – If this value is written the log will be compressed.
- missingok – If the log file is missing, go on to the next one without issuing an error message.
- size #M – specify the size of the file before rotation.
You can run the rotation by adding a cron task. For example, define it on the /etc/cron.hourly/, or run this task manually by running /usr/sbin/logrotate /etc/logrotate.conf