共用方式為


Log 方法

Writes the log entry.

命名空間:  Microsoft.SqlServer.Dts.Runtime
組件:  Microsoft.SqlServer.ManagedDTS (在 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() _
)
'用途
Dim instance As IDTSLogging
Dim eventName As String
Dim computerName As String
Dim operatorName As String
Dim sourceName As String
Dim sourceGuid As String
Dim executionGuid As String
Dim messageText As String
Dim startTime As DateTime
Dim endTime As DateTime
Dim dataCode As Integer
Dim dataBytes As Byte()

instance.Log(eventName, computerName, _
    operatorName, sourceName, sourceGuid, _
    executionGuid, messageText, startTime, _
    endTime, dataCode, 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
)
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
)
abstract Log : 
        eventName:string * 
        computerName:string * 
        operatorName:string * 
        sourceName:string * 
        sourceGuid:string * 
        executionGuid:string * 
        messageText:string * 
        startTime:DateTime * 
        endTime:DateTime * 
        dataCode:int * 
        dataBytes:byte[] byref -> unit 
function Log(
    eventName : String, 
    computerName : String, 
    operatorName : String, 
    sourceName : String, 
    sourceGuid : String, 
    executionGuid : String, 
    messageText : String, 
    startTime : DateTime, 
    endTime : DateTime, 
    dataCode : int, 
    dataBytes : byte[]
)

參數

  • executionGuid
    型別:System. . :: . .String
    The GUID of the specific execution of the package, used to distinguish multiple executions of the same package.
  • dataBytes
    型別:array<System. . :: . .Byte> [] () [] []%
    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.