Issue Summary: If INFO level debugging is enabled, the Catalina.out log in the Linux environment is too large before splitting and text editors cannot open the file.
The following changes have been made to the installer script:
- A new file logrotate.conf is added in {JavaAppServer}/conf/ folder.
- In newly created file “logrotate.conf”, following content is written:
/[Transact Install Directory]/JavaAppServer/logs/catalina.out{
notifempty
copytruncate
missingok
rotate 10
size 20M
}
About the above configuration:
- Make sure that the path /[Transact Install Directory]/JavaAppserver/logs/catalina.out above are adjusted to point to JavaAppServer’s catalina.out
- rotate– keeps at most 10 log files
- missingok – If the log file is missing, go on to the next one without issuing an error message.
- size– rotates if the size of catalina.out is bigger than 20M
- copytruncate – copytruncate instruct logrotate to creates the copy of the original file (i.e rotate the original log file) and truncates the original file to zero byte size. This helps the respective service that belongs to that log file can write to the proper file.
Above command will be executed based on cron job through Ephesoft Transact. New properties are added in application.properties file :
Linux:
#Cron job to rotate JavaAppServer catalina.out logs and command
javaappserver_log_rotation_cronjob_expression=0 */5 * ? * *
javaappserver_log_rotation_command=/usr/sbin/logrotate —state={Ephesoft–Install–Dir}/JavaAppServer/conf/logrotate.status
This logrotation will only work for Linux. A new bean has been added in Application/applicationContext.xml file which should be enabled if the user requires log rotation of JavaAppServer catalina.out logs.
<!– Un–comment it to start JavaAppServer logs rotation on this machine. —>
<import resource=”classpath:/META–INF/applicationContext–log.xml” />
Note : Above bean will be by default uncommented in Linux.