The WriteTaskRecord adds a record to the server log table for the current task execution, and formats it for WriteStringToLog to write it to the log file.
object.WriteTaskRecord ErrorCode, Description
Part | Description |
---|---|
object | Expression that evaluates to a PackageLog object reference |
ErrorCode | A long integer that can be an error code or other numeric information to be logged |
Description | A string that can be an error description or other textual information to be logged |
The WriteTaskRecord method is available to custom tasks, where the reference to the PackageLog object is a parameter of the task Execute method, which in a custom task, you must implement. It is also available in the Data Transformation Services (DTS) Microsoft® ActiveX® Script task, through the DTSPackageLog object.
HRESULT WriteTaskRecord(
long ErrorCode,
BSTR Description );