Configure the Log File Locations
By default, Find creates a folder of log files under the home directory. You can configure Find to store these log files in a different location.
To change the location of the log files
- Set the Java system property
logging.pathto the path of the directory to use (see Using Java System Properties). Find creates the specified directory if it does not exist, as long as the service has the appropriate permissions.
Advanced Log Configuration
In the default configuration, Find produces a new log file every day.
Find uses a time-based rolling policy as part of a standard Logback configuration to create logs (see https://logback.qos.ch/index.html). If required, you can modify the Find logging configuration by updating the logback-spring.xml configuration file inside the Find war file.
To find the logback-spring XML configuration file
- Open the
find.warfile as a ZIP archive. - Navigate to the
/WEB-INF/lib/lib folder and find a JAR file with a name of the formcore-*-.jar, where * is a string that includes the Find version number. - Open the
core-*-.jaras a ZIP archive and extract thelogback-spring.xmlfile.
For information about the settings that you can use to modify the way that Find generates the log file, refer to the Logback documentation. For example, the following link provides information about options that you can add to the existing log format: https://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy.
When you have made your modifications, you can update the version of the logback-spring.xml file in the core-*-.jar file, and then update this file in the find.war archive.
Tomcat Access Log Configuration
In addition to the Find log files, there is also a Tomcat access log, tomcat-access.log. This uses the same logging mechanism as the other logs, and you can configure the details by using the logback-spring.xml file (see Advanced Log Configuration).
You can set the logging pattern to use by using the server.tomcat.accesslog.pattern system property when you start Find. This option uses the standard Apache log format. For more information on the patterns that you can use in the log string, refer to the Apache documentation at https://tomcat.apache.org/tomcat-8.0-doc/api/org/apache/catalina/valves/AbstractAccessLogValve.html.
For example:
java -Dserver.tomcat.accesslog.pattern=combined -Didol.find.home=[home directory] -Dserver.port=[port] -jar find.war
NOTE: In Find 11.5 and earlier, the Tomcat access log was called access.log and used a different logging configuration. If you upgrade to Find 26.4 from 11.5 or earlier, you must remove the server.tomcat.accesslog.enabled=true from your system properties.
If you previously disabled Tomcat access logging by setting server.tomcat.accesslog.enabled=false, you disable the new version by setting server.tomcat.accesslog.pattern to an empty string (that is, server.tomcat.accesslog.pattern=).