Skip to main content
I would like to log the parameters that the user inputs to the log file.  I realize that the information can be found throughout the log file, but I would like to have a list of the inputs in a central location.  At the moment, the user is taking a screenshot of the input screen for QC verification.  If QC could simply check the log file, the user wouldn't have to worry about screenshots.

 

 

What I've tried so far in the Startup TCL Script is:

 

          FME_LogMessage fme_inform {FME_MacroValues(inputParameter)}

 

 

This was really just a stab in the dark, and didn't return what I was hoping for.
Hi,

 

 

I've never made the effort to learn TCL, so I can't help you there, unfortunately. If it can help, equivalent in Python would be

 

 

fmeobjects.FMELogFile().logMessageString("MyPublishedParameter is: " + FME_MacroValuesl"MyPublishedParameter"], fmeobjects.FME_INFORM)

 

 

As I see it, there are currently three issues with outputting the published parameters to the log:
  1. The workspace parameters are currently echoed to the Workbench log window on execution, but they are not written to the log file.
  2. FME_MacroValues contains a lot of internal stuff that is of no interest to the regular user, so logging everything makes little sense.
  3. There is, as far as I can tell, no way to get a list of all the values in FME_MacroValues that correspond to a published or private parameter.
All together it makes it a bit complicated to print e.g. only the published parameters to a log file in a simple and automated way.

 

 

My solution for QC-based logs have so far been to use a Python shutdown script to write a custom log file containing the published parameters and the number of features read and written. The list of the values passed to FME_MacroValues has to be hard-coded into the script, though, so that only the relevant parameters are echoed.

 

 

Hopefully this can give you some ideas.

 

 

David
Thank you.  That works great.

Reply