Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

LogProvider.Name Property

Gets or sets a the name of the LogProvider object, such as "SSIS log provider for Text files". This string is the text that shows in the Configure SSIS Logs (Providers and Logs Tab) dialog box in the Provider type drop-down menu.

Namespace:  Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)
public string Name { get; set; }

Property Value

Type: System.String
A String that contains the name of the LogProvider.

Implements

IDTSName.Name

When a log provider is added using the Add method, the default Name is the fully qualified assembly name, ProgID, or ClassID. The list of ProgIDs and ClassIDs for log providers is found in Add.

The following code example loads a package for which logging has been enabled. After loading the package, the LogProviders collection is created, and each log provider in the collection is enumerated over, printing the values for each property, including the Name.

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Tasks.DMQueryTask;

namespace LogProvider_Properties_Test
{
    class Program
    {
        static void Main(string[] args)
        {
            // The package is one of the SSIS samples,
            // modified to log information to the "SSIS
            // log provider for Text files".
            string mySample = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx";
            // Create the Application, and load the sample.
            Application app = new Application();
            Package pkg = app.LoadPackage(mySample, null);

            // Get the LogProviders collection from the package.
            LogProviders logProvs = pkg.LogProviders;
            foreach (LogProvider logProv in logProvs)
            {
                Console.WriteLine("ConfigString:   {0}", logProv.ConfigString);
                Console.WriteLine("CreationName    {0}", logProv.CreationName);
                Console.WriteLine("DelayValidation {0}", logProv.DelayValidation);
                Console.WriteLine("Description     {0}", logProv.Description);
                Console.WriteLine("HostType        {0}", logProv.HostType);
                Console.WriteLine("ID              {0}", logProv.ID);
                Console.WriteLine("InnerObject     {0}", logProv.InnerObject);
                Console.WriteLine("Name            {0}", logProv.Name);
             }
        }
    }
}

Sample Output:

ConfigString:

CreationName DTS.LogProviderTextFile.1

DelayValidation False

Description Writes log entries for events to a CSV file

HostType LogProvider

ID {1E107E39-DB79-4F02-B8A7-61D88F2DEF63}

InnerObject System.__ComObject

Name SSIS log provider for Text files

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.