語言

IDTSLogging.Log 方法

定義

寫入日誌條目。

public:
 void Log(System::String ^ eventName, System::String ^ computerName, System::String ^ operatorName, System::String ^ sourceName, System::String ^ sourceGuid, System::String ^ executionGuid, System::String ^ messageText, DateTime startTime, DateTime endTime, int dataCode, cli::array <System::Byte> ^ % dataBytes);
public 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);
abstract member Log : string * string * string * string * string * string * string * DateTime * DateTime * int * Byte[] -> unit
Public 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())

參數

eventName
String

事件呼叫日誌條目。

computerName
String

本地電腦的名稱。

operatorName
String

使用者帳號。

sourceName
String

事件的來源物體。

sourceGuid
String

任務的 GUID。

executionGuid
String

套件特定執行的 GUID,用來區分同一套件的多次執行。

messageText
String

要寫進日誌的文字。

startTime
DateTime

事件的開始時間。

endTime
DateTime

事件的結束時間。

dataCode
Int32

數值資料欄位。

dataBytes
Byte[]

一個用於二進位大型物件(BLOB)的位元組陣列欄位。

備註

伐木的主要方法是方法 Log 。 所有使用此方法記錄的事件都會被物件過濾 LoggingOptions 。 不過,透過查詢狀態來設定通話 Log 是否啟用 Enabled 日誌,則能獲得某些效能提升。 這能節省撰寫參數和方法呼叫開銷的時間。

適用於