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
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.
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
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.