I am using FME desktop and when the process completes I want to send out a email. I have that working but I also want to attach the log. I am not sure how to do that with the attachments parameters in the "PythonEmailer" Any help woudl be awesome.
Page 1 / 1
Hi!
If you look at the usage tab for that transformer, the file or files are a list of comma separated values.
Note that while your workspace is running, the log file is already open in writing mode thus sending it right away with this transformer may let the log file looks truncated because some information is not written to it yet.
If you want a way to have the log file name, a PythonCaller with this code before the PythonEmailer will extract it in the _logfile attribute:
import fmeobjects
def processFeature(feature):
feature.setAttribute("_logfile", fmeobjects.FMELogFile().getFileName())
Hi!
If you look at the usage tab for that transformer, the file or files are a list of comma separated values.
Note that while your workspace is running, the log file is already open in writing mode thus sending it right away with this transformer may let the log file looks truncated because some information is not written to it yet.
If you want a way to have the log file name, a PythonCaller with this code before the PythonEmailer will extract it in the _logfile attribute:
import fmeobjects
def processFeature(feature):
feature.setAttribute("_logfile", fmeobjects.FMELogFile().getFileName())
Thank you, this really helps out.