Transact

  1. Home
  2. Transact
  3. Features and Functions
  4. Administrator Role and Features
  5. System Configuration
  6. Linux Catalina.out Log Cannot be Opened in Text Editors

Linux Catalina.out Log Cannot be Opened in Text Editors

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:

  1. A new file logrotate.conf is added in {JavaAppServer}/conf/ folder.
  2. 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={EphesoftInstallDir}/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.

<!– Uncomment it to start JavaAppServer logs rotation on this machine. —>
<import resource=”classpath:/METAINF/applicationContextlog.xml” />

Note : Above bean will be by default uncommented in Linux.

Was this article helpful to you? Yes No