Find 24.3

# 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 by setting the `logging.path` property in the java run command.

To change the location of the log files

1. At the command line, send the java run command with the `logging.path` argument set to the location where you want to store your log files. For example:

       java -Dlogging.path=[log file directory] -Didol.find.home=[home directory] -Dserver.port=[port] -jar find.war

2. Restart Find to apply your configuration changes.

Find creates the specified directory if it does not exist, as long as the service has the appropriate permissions. It creates the logs directly in the specified directory.

If you run Find as a service on Windows, you can also add the `logging.path` property to the `find.xml` file.

If you run Find as a service on Linux, you can modify the `FIND_LOGGING_DIR` variable in the start scripts (`find.sh` for SystemV, `find.conf` for Upstart, or `find.service` for systemd).

When you modify the Find configuration by modifying the XML file or start scripts, you must restart Find to apply your configuration changes.

On Upstart, you must also run `initctl reload-configuration` before you restart, to apply the init file changes. You can then run `service find restart` to restart the service.

## 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

1. Open the `find.war` file as a ZIP archive.
2. Navigate to the `/WEB-INF/lib/` lib folder and find a JAR file with a name of the form `core-*-.jar`, where * is a string that includes the Find version number.
3. Open the `core-*-.jar` as a ZIP archive and extract the `logback-spring.xml` file.

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 24.3 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=`).

Copyright 2015-2024 Open Text
Version 24.3 | Last updated June 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL Find 24.3

Topic Title: Configure the Log File Locations