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
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.
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