tags:

views:

175

answers:

1

My SSIS package has logging configured with a SSIS log provider for text files, which works fine, but each time the package is run the log appends to the end of the log file. I want it to truncate the file and only keep the log from the most recent execution of the package, but I don't see an option anywhere to do that.

I've tried both file usage types (Existing file and New file) in the File Connection manager with the same results.

+1  A: 

I suggest you to clear the text file before Executing the package, using Script Task under Event Handler, by firing the event "OnPreExecute". I hope this works.

Sreejesh Kumar
You can use Script Task for entering log events.Apply Code for clearing the text and enter the log. You have to declare the System Variables through the properties of Script Task, for specifying the type of event.
Sreejesh Kumar
Thanks Sreejesh! I will give this a try and let you know if it works for me.
theog
ok. It will work.
Sreejesh Kumar