다음을 통해 공유


LogProviderBase.CloseLog Method

Called at the end of package execution.

네임스페이스: Microsoft.SqlServer.Dts.Runtime
어셈블리: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

구문

‘선언
Public Overridable Sub CloseLog
public virtual void CloseLog ()
public:
virtual void CloseLog ()
public void CloseLog ()
public function CloseLog ()

주의

CloseLog is called at the end of package execution after all of the objects in the package have completed execution, or when the package terminates due to errors. When writing a custom log provider, use this method to close active connections and perform cleanup work.

The following code example demonstrates an implementation of CloseLog, which closes the file stream opened during the OpenLog method.

public override void CloseLog()
{
    if (sw != null)
    {
        sw.WriteLine("Close log" + System.DateTime.Now.ToShortTimeString());
        sw.Close();
    }
}
Public Overrides  Sub CloseLog()
    If Not sw Is Nothing Then
        sw.WriteLine("Close log" + System.DateTime.Now.ToShortTimeString())
        sw.Close()
    End If
End Sub

For more information about the variables used in this example, see the OpenLog method.

스레드 보안

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

LogProviderBase Class
LogProviderBase Members
Microsoft.SqlServer.Dts.Runtime Namespace