--- title: "Logging in the Script Component | Microsoft Docs" ms.custom: "" ms.date: "03/06/2017" ms.prod: "sql-server-2014" ms.reviewer: "" ms.technology: integration-services ms.topic: "reference" helpviewer_keywords: - "Script component [Integration Services], logging" ms.assetid: 17c19787-379e-43fe-9107-e36e17ecda53 author: janinezhang ms.author: janinez manager: craigg --- # Logging in the Script Component Logging in [!INCLUDE[ssISnoversion](../../../includes/ssisnoversion-md.md)] packages lets you save detailed information about execution progress, results, and problems by recording predefined events or user-defined messages for later analysis. The Script component can use the method of the `ScriptMain` class to log user-defined data. If logging is enabled, and the **ScriptComponentLogEntry** event is selected for logging on the **Details** tab of the **Configure SSIS Logs** dialog box, a single call to the method stores the event information in all the log providers that have been configured for the data flow task. Here is a simple example of logging: `Dim bt(0) As Byte` `Me.Log("Test Log Event", _` `0, _` `bt)` > [!NOTE] > Although you can perform logging directly from your Script component, you may want to consider implementing events rather than logging. When using events, not only can you enable the logging of event messages, but you can respond to the event with default or user-defined event handlers. For more information about logging, see [Integration Services (SSIS) Logging](../../performance/integration-services-ssis-logging.md). ![Integration Services icon (small)](../../media/dts-16.gif "Integration Services icon (small)") **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 [!INCLUDE[ssISnoversion](../../../includes/ssisnoversion-md.md)] page on MSDN:

[Visit the Integration Services page on MSDN](https://go.microsoft.com/fwlink/?LinkId=136655)

For automatic notification of these updates, subscribe to the RSS feeds available on the page. ## See Also [Integration Services (SSIS) Logging](../../performance/integration-services-ssis-logging.md)