Creating a Custom Log Provider
Applies To: SQL Server 2016 Preview
The Integration Services run-time environment has extensive logging capabilities. A log lets you capture events that occur during package execution. Integration Services includes a variety of log providers that enable logs to be created and stored in multiple formats, such as XML, text, database, or in the Windows event log. If one of these providers or output formats does not fit your needs, you can create a custom log provider.
The steps involved in creating a custom log provider are similar to the steps for creating any other custom object for Integration Services:
Create a new class that inherits from the base class. For a log provider, the base class is LogProviderBase.
Apply the attribute that identifies the type of object to the class. For a log provider, the attribute is DtsLogProviderAttribute.
Custom user interfaces for custom log providers are not implemented in SQL Server Integration Services.
Because all managed log providers derive from the LogProviderBase base class, the first step when you create a custom log provider is to create a class library project in your preferred managed programming language, and then create a class that inherits from the base class. In this derived class you will override the methods and properties of the base class to implement your custom functionality.
Configure the project to sign the assembly that will be generated with a strong name key file.
Apply the DtsLogProviderAttribute attribute to the class that you have created to identify it as a log provider. This attribute provides design-time information such as the name and description of the log provider. The DisplayName and Description properties of the attribute correspond to the Name and Description columns displayed in the Configure SSIS Logs editor, which is displayed when configuring logging for a package in SQL Server Data Tools (SSDT).
<DtsLogProvider(DisplayName:="MyLogProvider", Description:="A simple log provider.", LogProviderType:="Custom")> _ Public Class MyLogProvider Inherits LogProviderBase ' TODO: Override the base class methods. End Class
The steps for building, deploying, and debugging a custom log provider in Integration Services are very similar to the steps required for other types of custom objects. For more information, see Building, Deploying, and Debugging Custom Objects.
| Stay Up to Date with Integration Services|
For the latest downloads, articles, samples, and videos from Microsoft, as well as selected solutions from the community, visit the Integration Services page on MSDN:
Visit the Integration Services page on MSDN
For automatic notification of these updates, subscribe to the RSS feeds available on the page.