Change logs catalina.out properties

book

Article ID: 17168

calendar_today

Updated On:

Products

CA API Developer Portal CA API Gateway

Issue/Introduction



How do I change the log size of catalina.out?

Environment

Portal 3.5

Resolution

Please see the steps below. 

*** LOG ROTATE STEPS **** 

1. SSH to the root prompt of the API Portal 

2. Create the file /etc/logrotate.d/levelPortal with the below contents; this will rotate the catalina log file once it reaches 100MB 

/opt/Deployments/lrs/server/logs/catalina.out { 
copytruncate 
size 100M 
rotate 10 
compress 
missingok 


3. Run the following command: 
chmod 644 /etc/logrotate.d/levelPortal 

4. You can force the log rotation by running this command: 
logrotate -f /etc/logrotate.d/levelPortal 

 

Additional Information

catalina.out log is ONLY rotated once per day, if there is an exceptional amount of logging during a day, it is possible that the catalina.out could grow larger than 100M.