For years I have been using a small helper function to log in both FME Desktop Log Window and Logfile (and FME Server):
def myLogger(string):
print(string)
with open(fme.logFileName,"a") as f:
f.write("{}\n".format(string))
With this, my log messages were written to the Logfile and when executed in FME Desktop Workbench also visible in the log window.
Now, FME 2018.1 and newer redirect stdout to info logging and stderr to warn logging in the FME session.
But in the Shutdown Script the FME Session has already been terminated.
Is there any way to put info into the FME Desktop Log Window from a Python Shutdown Script?