6.5 Changing the Log File Location

6.5.1 Linux

To change the location of the log files, create a symbolic link (somewhat synonymous with Windows shortcuts). Retain, by default, gives you the option during installation to store the logs at /var/log/retain-tomcat8 or at /opt/beginfinite/retain/tomcat8. If stored at /var/log/retain-tomcat8, then Retain creates a symbolic link at /opt/beginfinite/retain/tomcat8 directory called 'logs" that points to the /var/... location.

  1. Create the directory in the location you wish to use.

  2. Stop tomcat as described in Starting and Stopping the Retain Server in Retain 4.9.2: Installation and Upgrade.

  3. Move the current logs to the new location: mv /var/log/retain-tomcat8/* /[path to new directory]

  4. Make tomcat the owner of the new directory path: chown -R tomcat:tomcat /[path to new directory]

  5. Set the appropriate file *permissions for the tomcat user and group: chmod -R 664 /[path to new directory]

    * If you are moving them to a separate volume, the file permissions must be 774.

  6. Create a symbolic link in the parent directory of the default logs directory and point it to the new location:

    1. Change to the /var/log directory

    2. Remove the current log directory: rm -r retain-tomcat8

    3. Create a new symbolic link called retain-tomcat8 that points to your new log location: ln -s [path to new directory] ./retain-tomcat8

  7. Start tomcat.

6.5.2 Windows

  1. Ensure no archive jobs are running and stop Tomcat.

  2. Configure Tomcat's default log location.

    1. Click on Start.

    2. In the "Search programs and files" box, type: configure tomcat

    3. Click on Configure Tomcat

    4. Click on the Logging tab.

    5. Type in the new log path using the standard Windows path utilizing backslashes "\" (i.e., d:\retain\logs) or browse to it by clicking on the button with "..." on it.

    6. Click OK.

  3. Make a backup copy of the existing log4j.properties file.

  4. Edit the log4j.properties located at [drive]:\Program Files\Beginfinite\Retain\[RetainServer, RetainWorker, RetainWorker1, &etc]\WEB-INF\classes.

  5. Do a search on ${catalina.base}/logs/ and replace it with [desired path using forward slashes "/"]/logs/ (i.e., D:/retain/logs/). An easy way to do this is to use the text editor's (i.e., Notepad") "Replace" function.

  6. Repeat steps 2 - 4 for every log4j.properties file (server, worker, stub server, stats server). The only log that is created at the default log location is the localhost.[date].log, but it is a very small log.