• I do something similar, mainly because I find using SQL to select the interesting parts of my log more natural than processing an unstructured text file.

    I have a ToLOG(Level, Message) procedure that gets called from my code at the end of each step - and if I'm debugging new code, during it.

    It records the SSIS run start time, current time, SSIS task name, Level and Message. The start time means I can easily display results for last run only, and calculate duration from start if checking where the delays are. Level is 0 for Debug, 1 for normal messages, 2 for data load complete, up to 8 for Fatal Error.

    One problem with using ToLOG() is that it only logs events in script components. So I also have an SQL version for use in the SQL procedures I use in Execute SQL tasks.

    Then as the final task I mail the log content (WHERE Level>0 to hide Debug messages) to myself and my customer. I turn the SQL result into an HTML table, with Completed steps flagged in green and Errors in red, which makes it easy for my customer to see what happened - important as I work for them part-time and they need to be able to fix simple errors in the input data files (the usual cause of an error) themselves, and only call me for real problems.