Symptoms

FME Server log files can accumulate rapidly and take up significant space on your file system. The KML network link service or other real-time services in particular create a large number of log files. 

Cause

Every workspace run by FME Server created a log file and every component of FME Server created a log file when it is restarted.

Resolution

In FME Server 2012 a sample workspace is provided in the Utilities repository to delete outdated log files. There is a scheduled task for this workspace that can be enabled to clean up the logs on a regular interval. To locate this scheduled task to go to the Web Admin User Interface (http://<Host>/fmeserver-admin/ and click on the Schedules tab. Double-click on the scheduled task entitled Purge_Logs.  Here you can set the task to happen at any interval you wish and "Enable" it. 

Alternatively and in older versions of FME you may need to create your own script to delete the log files.  It is recommended that you leave the directory structure in tact but remove individual log files from the FME Server logs directory here:
<FMEServer>\Logs\

Here is a sample shell script you can use to help clean up the log files on Linux or Solaris.
  1. Ensure FME Server is shutdown so the log files are not locked. You will also need to shutdown the servlet engine (i.e. Tomcat) since the services logs, i.e. datadownload_1234567890.log, are created by the services which are run by the servlet engine, not FME Server.
  2. Create the following shell script:
#----------------------------------------------------------
# Purge FME application logs
#----------------------------------------------------------
#----------------
# Stop FME Server
#----------------
/<install>/FMEServer/Server/stopServer.sh
sleep 120
#----------------
# Backup FME Logs
#----------------
cd /<install>/FMEServer/Logs
if [ -e fmelogs.tar.z ]; then
   rm fmelogs.tar.z
fi
find . -name '*.log' -print > fmelogs.lst
cat fmelogs.lst|xargs tar cvf fmelogs.tar
gzip fmelogs.tar
#----------------
# Purge FME Logs
#----------------
find . -name '*.log' -exec rm -f {} \;
#-----------------
# Start FME Server
#-----------------
/<install>/FMEServer/Server/startServer.sh &