Skip to main content
Question

LOG file location in shutdown script

  • August 13, 2014
  • 3 replies
  • 50 views

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
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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
Celebrity
  • August 14, 2014
Hi Subrat,

 

 

try using pre-defined variable "FME_LogFileName" instead.

 

 

Takashi