LogProviders.Add Method (String)


Adds the specified log provider to the end of the collection.

Namespace:   Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)

member Add : 
        logProviderClsidOrProgId:string -> LogProvider


Type: System.String

The class ID or ProgID of the log provider to add to the collection.

Return Value

Type: Microsoft.SqlServer.Dts.Runtime.LogProvider

The LogProvider object added to the collection.

When you add a log provider to the collection, you can add it using its ClassID (GUID) or ProgID. The following list shows the available loggers and their IDs.

Text file:

  • ProgID: DTS.LogProviderTextFile.1

  • ClassID: {59B2C6A5-663F-4C20-8863-C83F9B72E2EB}

SQL Server Profiler:

  • ProgID: DTS.LogProviderSQLProfiler.1

  • ClassID: {5C0B8D21-E9AA-462E-BA34-30FF5F7A42A1}

SQL Server:

  • ProgID: DTS.LogProviderSQLServer.1

  • ClassID: {6AA833A1-E4B2-4431-831B-DE695049DC61}

Windows Event Log:

  • ProgID: DTS.LogProviderEventLog.1

  • ClassID: {97634F75-1DC7-4F1F-8A4C-DAF0E13AAA22}

XML File:

  • ProgID: DTS.LogProviderXMLFile.1

  • ClassID: {AFED6884-619C-484F-9A09-F42D56E1A7EA}

The following code sample adds the SQL Server log provider to the collection using its ProgID. In the console output from the foreach (C#) loop, notice the position in the collection and the name assigned to the newly-added log provider.

No code example is currently available or this language may not be supported.

Sample Output:

Initial number of log providers: 1

The number of log providers now: 2


Log Provider Name: {FCA3ACD4-C080-4B67-A1AA-45118D3DA672}

Log Provider Name: SSIS log provider for Text files

Return to top