Hi there,
Here's a conundrum for all you wonderful conundrumers...!
Background: I have a BASE.FMW that reads a list of names and runs a Workspace Runner for each name. Before it does, it writes out a quick message using the MessageLogger and the 'WARN' flag to the logfile I have set up. Each call to the WSR takes some time to run. The log line in the translation line and the log file looks like this:
2021-08-20 14:37:30|Â Â 4.3|Â 0.0|WARNÂ |Processing 3 Named: Town of Comox...
Â
Back to the Present: I am building a PYTHON standalone script using fmeobjects.FMEWorkspaceRunner().runWithParameters(BASE.FMW, myparams) to run the BASE.FMW and it runs fine and produces the correct results, including the log file.
Â
My conundrum: the LIVE feedback in python from fmeobjects is non-existent. I would like to get those 'WARN' log lines from the logger AS IT IS WRITING THEM so I can give my python user some indication that something, anything, is happening. Right now, the .runWithParameters() is a black box and the user just has to sit there hoping that something is happening while watching their thumbs twiddle.
Â
I have a snippet of python code that grabs lines from a file and prints them but it only runs either after the .runWithParameters() completes or hangs in a While loop because I can't figure out how to stop it. :-)
Â
Can the FMELogfile give me what it's writing LIVE using STANDARDOUT or something?
Â
Your thoughts?
TIA,
Brian