Skip to main content
Solved

using LOG_FILENAME in StringConcatenator

  • August 6, 2013
  • 1 reply
  • 15 views

mhab
Contributor
Forum|alt.badge.img+10
  • Contributor
Hello

 

 

Is there any trick to somehow use the LOG_FILENAME value in a Concatenator ?

 

 

Background:

 

I call "fme.exe" from commandline (BAT file) with:

 

     fme.exe ....  -LOG_FILENAME "...."

 

 

So LOG_FILENAME is NOT a parameter (like those --paramname arguments).

 

I cannot find it under Systemparameters either...

 

 

Thanks for any hints

 

Michael

Best answer by takashi

Hi Michael,

 

 

FMELogFile class of Python fmeobjects module has getFileName method which returns the current log file name. So, for example, a PythonCaller with this script adds an attribute which stores the log file name to each feature. ----- import fmeobjects   class LogFileNameExtractor(object):     def __init__(self):         logFile = fmeobjects.FMELogFile()         self.logFileName = logFile.getFileName()              def input(self, feature):         feature.setAttribute('log_filename', self.logFileName)         self.pyoutput(feature)              def close(self):         pass -----   Takashi
View original
Did this help you find an answer to your question?
<strong>This post is closed to further activity.</strong><br /> It may be a question with a best answer, an implemented idea, or just a post needing no comment.<br /> If you have a follow-up or related question, please <a href="https://community.safe.com/topic/new">post a new question or idea</a>.<br /> If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

takashi
Evangelist
  • Best Answer
  • August 7, 2013
Hi Michael,

 

 

FMELogFile class of Python fmeobjects module has getFileName method which returns the current log file name. So, for example, a PythonCaller with this script adds an attribute which stores the log file name to each feature. ----- import fmeobjects   class LogFileNameExtractor(object):     def __init__(self):         logFile = fmeobjects.FMELogFile()         self.logFileName = logFile.getFileName()              def input(self, feature):         feature.setAttribute('log_filename', self.logFileName)         self.pyoutput(feature)              def close(self):         pass -----   Takashi

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