We have our application server(tomcat) creating the catalina.log and we need to write a cron job(bash script) to run every hour and rotate the log files with timestamp.
currently we are doing this in the following way.
- copy the catalina.out to catalina.out.
- empty the catalina.out
The issue we have is, if anything written to the catalina.out during this process, that is gone missing during the emptying the catalina.out. Is there anyway to overcome this issue?
Thanks in advance Mayuran