Skip to main content
Solved

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


salvaleonrp
Enthusiast
Forum|alt.badge.img+19

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

 

 

Best answer by salvaleonrp

daveatsafe wrote:

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.

 

View original
Did this help you find an answer to your question?
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.

3 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • March 13, 2023

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


salvaleonrp
Enthusiast
Forum|alt.badge.img+19
  • Author
  • Enthusiast
  • Best Answer
  • March 13, 2023
daveatsafe wrote:

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.

 


salvaleonrp
Enthusiast
Forum|alt.badge.img+19
  • Author
  • Enthusiast
  • March 13, 2023
salvaleonrp wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings