Question

Write logfile "ERROR" messages to a database attribute table table

  • 23 March 2024
  • 2 replies
  • 23 views

Badge +3

Hey FME Community!

I'm working on a project where I need to write logfile "ERROR" messages to a database attribute table. Specifically, I want to capture the time of writing data whenever an error occurs, and then collect that error information into the database attribute table.

I'm wondering if anyone has experience or suggestions on how best to achieve this within FME. Are there any transformers or workflows you've used successfully for similar tasks? Any insights or advice would be greatly appreciated!

Looking forward to hearing from you all and learning from your expertise!


2 replies

Userlevel 2
Badge +19

Hi vishnunv

Perhaps a workflow using a Timestamper to capture the datetimenow() function, follow this with a DatetimeConvertor if you need to make the date ISO format.

After the logger, add a FeatureWriter transformer and point it to the database and the featuretype will be the table name. From here you need to consider the table operations, which may always be simply INSERT and use existing. Under the user attributes, each the attribute definition to match the destination. You may need an attributerenamer before the FeatureWriter if you need to align the columns between the workflow and the destination database

Userlevel 4

Perhaps the LogMessageStreamer could be helpful here, it lets you “listen” for messages in the FME log and lets you capture and process those that interest you, e.g. by saving them to a database log table.

Reply