Control Log File Size

Note: You will need administrator permissions.

  1. Open the log4j.properties file, located at <Ephesoft_Directory>\EphesoftReports\WEB-INF\classes\log4j.properties. Write the following sample configuration to limit the size of the catalina.log file and its back up count:
log4j.appender.CATALINA=org.apache.log4j.RollingFileAppender
log4j.appender.CATALINA.File=${catalina.base}/logs/catalina.log.
log4j.appender.CATALINA.Append=true
log4j.appender.CATALINA.MaxFileSize=2MB
log4j.appender.CATALINA.MaxBackupIndex = 30
log4j.appender.CATALINA.Encoding=UTF-8
log4j.appender.CATALINA.layout = org.apache.log4j.PatternLayout
log4j.appender.CATALINA.layout.ConversionPattern = %d [%t] %-5p %c- %m%n

Note: This sample configuration sets the maximum file size to 2MB. You can change this by setting the following property to your preferred maximum log size:

log4j.appender.CATALINA.MaxFileSize=
  1. Save and close the log4j.properties file.
  2. Open EphesoftTransact.exe located at <Ephesoft_Directory>\JavaAppServer\bin\EphesoftTransact.exe.

Note: In older versions, this file is labeled EphesoftEnterprise.exe.

  1. Select the Logging tab.
  2. Set Redirect Stdout to redirect to the catalina.log file.
Figure 1. EphesoftTransact Properties Logging Tab
  1. Apply the changes.
  2. Start the Ephesoft Transact server.

The rollover only works when Ephesoft Transact is running as an application. Stdout logs are only written when Ephesoft is running as a service. As a service, the workaround will overwrite the log file, but no rollover will occur. You will be able to maintain a manageable size file. As an app, recycled and rolled over files will be created.

MaxFileSize will apply to service and app log settings.

In the event that additional logging is needed for a longer duration, repeat steps 1 and 2 above and increase the MaxFileSize.