Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS Script Task : How to log to output using Dts.Log

I searched a lot for this but no luck.

I have a script task and inside that I've written some C# code. I have a look and I want to print output like what we see in Output Window

I'm using Dts.Log() using below code:

Dts.Log("List of files are loaded: ", 0, new byte[0]);

But I don't see anything in output window.

I already have enabled logging as you see:

SSIS Log Configuration

I know if I use

Dts.Events.FireInformation

It does the job, but I like to know how I can use Dts.Log() for this purpose.

like image 491
FLICKER Avatar asked Oct 19 '22 04:10

FLICKER


1 Answers

A very old question, but it may be worth answering anyway.

When you use Dts.Log, it doesn't go to the output screen but to the log window. So you should open the SSIS menu and select the "Log Events" entry.

If your SSIS menu is missing that option, try clicking on the control flow window or the Script Task node.

More info in How to check the SSIS package job results after it has completed its execution?.

like image 130
Andrew Avatar answered Oct 21 '22 05:10

Andrew