Open Linux Catalina.out log in text editors
With the INFO level debugging enabled, the Catalina.out log in the Linux environment is too large before splitting and you cannot open the file in text editors.
To open the Catalina.out log, the installer script includes the logrotate.conf file in {JavaAppServer}/conf/ folder. The logrotate.conf file has following content:
/[Transact Install Directory]/JavaAppServer/logs/catalina.out{
notifempty
copytruncate
missingok
rotate 10
size 20M
}
Where:
- 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 instructs log_rotate to create the copy of the original file (that is, rotate the original log file) and truncate the original file to zero byte size. This helps the respective service that belongs to that log file to write to the proper file.
Make sure that the path /[Transact Install Directory]/JavaAppserver/logs/catalina.out is adjusted to point to JavaAppServer catalina.out.
The specified command is executed based on cron job through Transact. The application.properties file includes the following properties:
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 log_rotation only works for Linux. The bean in the Application/applicationContext.xml file 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” />
The specified bean is by default uncommented in Linux.