Solved

Does anyone have a better way of capturing the first 30 lines of the translation log?


Badge +10

I need these translation log info to be part of my translation canvass so I can include them into the header of my report.

imageI used to have this solution in place but I'm hoping to find a more efficient way to include the info in my canvass and not the shutdown.

 

https://community.safe.com/s/question/0D54Q000080hedASAQ/using-the-processid-and-timestamp-as-my-log-name-failing-on-rename-with-py3x-but-not-27

 

 

icon

Best answer by salvaleonrp 13 March 2023, 23:41

View original

3 replies

Userlevel 2
Badge +17

Hi @Renato Salvaleon​,

The LogMessageStreamer transformer won't return the first lines in the log file, so your best bet is to add a FeatureReader triggered by a feature close to the end of the workspace. Read the log file as a Text File.

You can get the location of the logfile by concatenating the FME_MF_DIR and FME_MF_NAME parameters, then replacing the '.fmw' at the end with '.log'.

Badge +10

Hi @Renato Salvaleon​,

The LogMessageStreamer transformer won't return the first lines in the log file, so your best bet is to add a FeatureReader triggered by a feature close to the end of the workspace. Read the log file as a Text File.

You can get the location of the logfile by concatenating the FME_MF_DIR and FME_MF_NAME parameters, then replacing the '.fmw' at the end with '.log'.

I like that, no need for the shutdown script.

 

Badge +10

I like that, no need for the shutdown script.

 

Thanks @daveatsafe​, exactly what I needed.

 

Worked for me. I just have to expose the attribute text_line_data and do some string parsing and I get the results I need.

Reply