The solution clearly provides what you want in terms of error handling/logging, but wouldn't it be easier to use the Log Providers that are readily available with SSIS? For example, you could use a 'SSIS log provider for SQL Server' provider to write to a table of your choice. The details that you want to capture (MessageText, Source etc.) can be chosen for each Event, e.g. OnError, OnWarning, OnInformation etc.
Seems a lot easier than having to write script components...