Foundation Hub: How do I setup log rotation for catalina.out on Red Hat Enterprise Linux

In order to setup log rotation for catalina.out, perform the following steps

1. Create a logrotate config file for the 'catalina.out' logfile 

sudo touch /etc/logrotate.d/bhub-catalina.conf

2. Edit this file to include the configuration below as a starting point which can be customized for your deployment.
Note: the comment lines, beginning with '#' are not required

# Configuration for the path /opt/BIOVIA/Foundation/apache-tomcat/logs/catalina.out
# Edit this full path as required for your installation 
/opt/BIOVIA/Foundation/apache-tomcat/logs/catalina.out 
{
    # Perform rotation daily
    daily
    # Keep 90 logfiles 
    rotate 90
    # Use a date extension
    dateext
    # Date format for the extension '-20251103' 
    dateformat -%Y%m%d
    # Use yesterday's date 
    dateyesterday
    # Compress the old rotated logs 
    compress
    # Wait until the next rotation to compress files 
    delaycompress
    # No error if file is missing
    missingok
    # Do not rotate empty logfiles 
    notifempty
    # Copy and Truncate the log as it will be locked by Tomcat
    # This overrides logrotate's default action to move the old file which is not possible
    copytruncate
    # su to the user and group that owns hub, in this example it is 'biovia'
    su biovia biovia
}

3. Save the file 

4. Test the configuration 

sudo logrotate -d /etc/logrotate.d/bhub-catalina.conf

5. You should not see any errors in the output

6. Optionally, force your first rotation to test further

sudo logrotate -f /etc/logrotate.d/bhub-catalina.conf

7. Your 'logs' directory should now contain a 'catalina.out' file and a 'catalina.out-20251103' file (adjusted for date).