IDTSLogging.Log Method

Writes the log entry.

命名空間: Microsoft.SqlServer.Dts.Runtime
組件: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

語法

'宣告
Sub Log ( _
    eventName As String, _
    computerName As String, _
    operatorName As String, _
    sourceName As String, _
    sourceGuid As String, _
    executionGuid As String, _
    messageText As String, _
    startTime As DateTime, _
    endTime As DateTime, _
    dataCode As Integer, _
    ByRef dataBytes As Byte() _
)
void Log (
    string eventName,
    string computerName,
    string operatorName,
    string sourceName,
    string sourceGuid,
    string executionGuid,
    string messageText,
    DateTime startTime,
    DateTime endTime,
    int dataCode,
    ref byte[] dataBytes
)
void Log (
    String^ eventName, 
    String^ computerName, 
    String^ operatorName, 
    String^ sourceName, 
    String^ sourceGuid, 
    String^ executionGuid, 
    String^ messageText, 
    DateTime startTime, 
    DateTime endTime, 
    int dataCode, 
    array<unsigned char>^% dataBytes
)
void Log (
    String eventName, 
    String computerName, 
    String operatorName, 
    String sourceName, 
    String sourceGuid, 
    String executionGuid, 
    String messageText, 
    DateTime startTime, 
    DateTime endTime, 
    int dataCode, 
    /** @ref */ byte[] dataBytes
)
JScript 不支援以傳址方式傳遞值類型的引數。

參數

  • eventName
    The event calling the log entry.
  • computerName
    The name of local computer.
  • operatorName
    The user account.
  • sourceName
    The object that is the source of the event.
  • sourceGuid
    The GUID of the task.
  • executionGuid
    The GUID of the specific execution of the package, used to distinguish multiple executions of the same package.
  • messageText
    The text to write in the log.
  • startTime
    The start time of the event.
  • endTime
    The end time of the event.
  • dataCode
    Numeric data field.
  • dataBytes
    A byte array field for binary large objects (BLOBs).

備註

The primary method for logging is the Log method. All events logged using this method will be subject to filtering by the LoggingOptions object. However, you achieve certain performance gains by conditioning the calls to Log based on whether logging is enabled, which is done by checking the Enabled status. This enables you to save the time it would take to compose the arguments and the method call overhead.

執行緒安全性

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 的硬體和軟體需求>。

請參閱

參考

IDTSLogging Interface
IDTSLogging Members
Microsoft.SqlServer.Dts.Runtime Namespace