Early Beanstalk AMPs did not rotate magazines properly. You can fix this using the latest AMI in your deployment. Go to EC2 Console, AMI. Filter the list by selecting Amazon Images, "elasticbeanstalk", then sort by "Source" to see the latest AMIs.
Alternatively, you can edit the /etc/logrotate.conf.elasticbeanstalk file on the Beanstalk server to fix log rotation. The following configuration adds a timestamp after the file names. It produces logs such as tail_catalina.log-1322236861.gz, tail_catalina.log-1322240461.gz, etc.
/var/log/tomcat6/catalina.out /var/log/tomcat6/monitor_catalina.log /var/log/tomcat6/tail_catalina.log { size 1M missingok rotate 2 compress notifempty copytruncate dateext dateformat -%s lastaction /bin/chown tomcat:elasticbeanstalk /var/log/tomcat6/*gz; /bin/chmod 664 /var/log/tomcat6/*gz endscript }
source share