Including the Log File with the Data Download Results
From fmepedia
(http://fmepedia.com/index.php/Category:FME_Server)
Usually when you run a workspaces using the data download service the output is returned as a zip file containing only the data. In some scenarios the user may wish to also view the logfile. To do this you must modify the following configuration files:
1. Open the fmeEngineConfig.txt file which the first FME Engine is using i.e. C:\Program Files\FMEServer\Server\fmeEngineConfig.txt
- Modify the SUB_SECTION FILE_DOWNLOAD_SERVICE by inserting the following line of code, in my file it needed inserting into line 22:
POST_COMMAND !CONTINUE_WARN! cmd.exe /c copy "C:\Program Files\FMEServer\Logs\datadownload\!FME_AUTO_FILE_NAME_SIMPLE.log!"
"!FME_AUTO_DIR_NAME!" \
2. Here is the full section so you can see where it should be placed:
SUB_SECTION FILE_DOWNLOAD_SERVICE \ FME_WORKING_DIR "C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps
\ROOT\fmedatadownloadresults" \ FME_MAPPING_DIR "C:/Program Files/FMEServer/Server/repository" \ FME_TRANSFORMATION_LOG_DIR "C:/Program Files/FMEServer/Logs/datadownload" \ PRE_COMMAND mkdir "!FME_AUTO_DIR_NAME!" \ POST_COMMAND cd !FME_AUTO_DIR_NAME! \ POST_COMMAND !CONTINUE_WARN! cmd.exe /c copy "C:\Program Files\FMEServer\Logs\datadownload\!FME_AUTO_FILE_NAME_SIMPLE.log!"
"!FME_AUTO_DIR_NAME!" \ POST_COMMAND !CONTINUE_NO_WARN! "C:/Program Files/FMEServer/Utilities/zip.exe"
-rq "!FME_AUTO_FILE_NAME.zip!" * \ POST_COMMAND !CONTINUE_NO_WARN! cd .. \ POST_COMMAND !CONTINUE_NO_WARN! rmdir /S /Q "!FME_AUTO_DIR_NAME!" \ SUCCESS_RESPONSE 0:Translation Successful|OutputLocation=!FME_AUTO_FILE_NAME.zip!|
ResultPrefix=http:|ResultRootDir=//POMPOM:80/fmedatadownloadresults|NumFeaturesOutput=!FME_NUM_FEATURES_OUTPUT!|LogFileLocation=
C:/Program Files/FMEServer/Logs/datadownload/!FME_AUTO_FILE_NAME_SIMPLE.log! \ FAILURE_RESPONSE !FME_ERROR_NUMBER!:!FME_ERROR_MSG!
3. Repeat the process for the next C:\Program Files\FMEServer\Server\fmeEngineConfig_n.txt file. You will need to do one for each engine you are running. To check to see which Engines are using which configuration file check at the bottom of the C:\Program Files\FMEServer\Server\ processMonitorConfig.txt
