Click or drag to resize

LoggerSwallowAsync Method (Task)

Returns a task that completes when a specified task to completes. If the task does not run to completion, an exception is logged at Error level. The returned task always runs to completion.

Namespace:  NLog
Assembly:  NLog (in NLog.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax
public Task SwallowAsync(
	Task task
)

Parameters

task
Type: System.Threading.TasksTask
The task for which to log an error if it does not run to completion.

Return Value

Type: Task
A task that completes in the RanToCompletion state when task completes.

Implements

ISuppress.SwallowAsync(Task)
See Also