ITaskExecutionContext.Log 方法

定义

执行任务的日志方法。

重载

Log(ITask, Exception)

记录任务执行的进度。

Log(ITask, String)

在具有指定字符串参数的日志中指示任务执行的进度。

Log(ITask, String, TaskExecutionLogEntryType)

在具有指定字符串和日志条目类型的日志中指示任务执行的进度。

Log(ITask, String, Exception, TaskExecutionLogEntryType)

在具有指定字符串、错误消息和日志条目类型的日志中指示任务执行的进度。

Log(ITask, Exception)

记录任务执行的进度。

public:
 void Log(Microsoft::SqlServer::Management::ITask ^ task, Exception ^ error);
public void Log (Microsoft.SqlServer.Management.ITask task, Exception error);
abstract member Log : Microsoft.SqlServer.Management.ITask * Exception -> unit
Public Sub Log (task As ITask, error As Exception)

参数

task
ITask

表示任务的接口。

error
Exception

与此消息关联的异常。

适用于

Log(ITask, String)

在具有指定字符串参数的日志中指示任务执行的进度。

public:
 void Log(Microsoft::SqlServer::Management::ITask ^ task, System::String ^ message);
public void Log (Microsoft.SqlServer.Management.ITask task, string message);
abstract member Log : Microsoft.SqlServer.Management.ITask * string -> unit
Public Sub Log (task As ITask, message As String)

参数

task
ITask

表示任务的接口。

message
String

表示文本消息的字符串值。

适用于

Log(ITask, String, TaskExecutionLogEntryType)

在具有指定字符串和日志条目类型的日志中指示任务执行的进度。

public:
 void Log(Microsoft::SqlServer::Management::ITask ^ task, System::String ^ message, Microsoft::SqlServer::Management::TaskExecutionLogEntryType logEntryType);
public void Log (Microsoft.SqlServer.Management.ITask task, string message, Microsoft.SqlServer.Management.TaskExecutionLogEntryType logEntryType);
abstract member Log : Microsoft.SqlServer.Management.ITask * string * Microsoft.SqlServer.Management.TaskExecutionLogEntryType -> unit
Public Sub Log (task As ITask, message As String, logEntryType As TaskExecutionLogEntryType)

参数

task
ITask

表示任务的接口。

message
String

表示文本消息的字符串值。

logEntryType
TaskExecutionLogEntryType

要使用的 logEntry 的类型。

适用于

Log(ITask, String, Exception, TaskExecutionLogEntryType)

在具有指定字符串、错误消息和日志条目类型的日志中指示任务执行的进度。

public:
 void Log(Microsoft::SqlServer::Management::ITask ^ task, System::String ^ message, Exception ^ error, Microsoft::SqlServer::Management::TaskExecutionLogEntryType logEntryType);
public void Log (Microsoft.SqlServer.Management.ITask task, string message, Exception error, Microsoft.SqlServer.Management.TaskExecutionLogEntryType logEntryType);
abstract member Log : Microsoft.SqlServer.Management.ITask * string * Exception * Microsoft.SqlServer.Management.TaskExecutionLogEntryType -> unit
Public Sub Log (task As ITask, message As String, error As Exception, logEntryType As TaskExecutionLogEntryType)

参数

task
ITask

表示任务的接口。

message
String

表示文本消息的字符串值。

error
Exception

与此消息关联的异常。

logEntryType
TaskExecutionLogEntryType

要使用的 logEntry 的类型。

适用于