If you want to log from a script task, you can use the Dts.Log function.
This function can log to the system table: dbo.sysssislog. If you configure you’re package logging correctly.
Most importantly, if you want to log from a script task by using the function Dts.Log, enable logging for the specific script task and enable "ScriptTaskLogEntry"
|Steps to enable logging from within you SSIS script task|
|Make sure you’re Script Task contains a Dts.Log function call, like:
|In the control flow right click and choose Logging…
Check all checkboxes in the treeview, make sure the script task is not grayed out or unchecked
Click on the top node in the treeview and add SSIS log provider for SQL Server:
|Enable ScriptTaskLogEntry in the details tab of the script task|
|When you run this package, you should see the logging in the table dbo.sysssislog|