Click or drag to resize

AsyncTaskTargetWriteAsyncTask Method

Overload List
  NameDescription
Protected methodWriteAsyncTask(IListLogEventInfo, CancellationToken)
Override this to provide async task for writing a batch of logevents.
Protected methodCode exampleWriteAsyncTask(LogEventInfo, CancellationToken)
Override this to provide async task for writing a single logevent.
Examples
Example of how to override this method, and call custom async method
1protected override Task WriteAsyncTask(LogEventInfo logEvent, CancellationToken token)
2{
3   return CustomWriteAsync(logEvent, token);
4}
5
6private async Task CustomWriteAsync(LogEventInfo logEvent, CancellationToken token)
7{
8    await MyLogMethodAsync(logEvent, token).ConfigureAwait(false);
9}
Top
See Also