 | 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.5.0+1873145cbc26e0312d9481234d69ce7dc68aac4e
Syntaxpublic Task SwallowAsync(
Task task
)
Public Function SwallowAsync (
task As Task
) As Task
Dim instance As Logger
Dim task As Task
Dim returnValue As Task
returnValue = instance.SwallowAsync(task)
abstract SwallowAsync :
task : Task -> Task
override SwallowAsync :
task : 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:
TaskA task that completes in the
RanToCompletion state when
task completes.
Implements
ISuppress.SwallowAsync(Task)
See Also