Log-Methode
Writes the log entry.
Namespace: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)
Syntax
'Declaration
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() _
)
'Usage
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[]
)
Parameter
- eventName
Typ: System. . :: . .String
The event calling the log entry.
- computerName
Typ: System. . :: . .String
The name of local computer.
- operatorName
Typ: System. . :: . .String
The user account.
- sourceName
Typ: System. . :: . .String
The object that is the source of the event.
- sourceGuid
Typ: System. . :: . .String
The GUID of the task.
- executionGuid
Typ: System. . :: . .String
The GUID of the specific execution of the package, used to distinguish multiple executions of the same package.
- messageText
Typ: System. . :: . .String
The text to write in the log.
- startTime
Typ: System. . :: . .DateTime
The start time of the event.
- endTime
Typ: System. . :: . .DateTime
The end time of the event.
- dataCode
Typ: System. . :: . .Int32
Numeric data field.
- dataBytes
Typ: array<System. . :: . .Byte> [] () [] []%
A byte array field for binary large objects (BLOBs).
Hinweise
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.