Skip to main content
Question

LOG file location in shutdown script


Forum|alt.badge.img
Hi,

 

    My workbench is published in FMEServer. At the end of workbench execution, i have to log the generated LOG file and FFS file complete path in database . I thought of doing it in shutdown script. But i do not know how to get their location.

 

 

Any pointers will be highly helpful.

 

 

Thanks.

 

Subrat

3 replies

david_r
Celebrity
  • August 13, 2014
Hi,

 

 

starting with FME 2014, you can get the FME log file location in a shutdown script like this:

 

 

---

 

import fme

 

log_file_name = fme.logFileName

 

---

 

 

For your FFS file, it is not so simple, but I guess that you can publish the FFS filename as a parameter and then access it the usual way through the FME_MacroValues dictionary, e.g.

 

 

ffs_file_name = FME_MacroValues['MY_FFS_FILENAME_PARAMETER']

 

 

David

Forum|alt.badge.img
  • Author
  • August 13, 2014
Thanks David for the solution. Unfortunately, my project has licenced FME Server and Desktop 2013.

 

I tried in FME desktop 2013 SP4 (20131025 - Build 13547 - WIN32) and i am getting following python error.

 

 

Python Exception <ImportError>: No module named fme

 

Error executing string `import fme

 

log_file_name = fme.logFileName

 

print 'log_file_name:',log_file_name'

 

FME_END_PYTHON failed to execute provided script

 

 

FME_END_PYTHON failure

 

Program Terminating

 

 

Is there any way to solve the problem in this FME version?

 

 

Thanks.

 

 


takashi
Influencer
  • August 14, 2014
Hi Subrat,

 

 

try using pre-defined variable "FME_LogFileName" instead.

 

 

Takashi

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings