A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://nlog-project.org/documentation/v4.7.0/html/T_NLog_Targets_AsyncTaskTarget.htm below:

  Name Description CaptureContextGdc (Inherited from TargetWithContext.) CaptureContextMdc (Inherited from TargetWithContext.) CaptureContextMdlc (Inherited from TargetWithContext.) CaptureContextNdc (Inherited from TargetWithContext.) CaptureContextNdlc (Inherited from TargetWithContext.) CloseTarget

Closes Target by updating CancellationToken

(Overrides TargetWithContextCloseTarget.) Dispose

Closes the target.

(Inherited from Target.) Dispose(Boolean)

Releases any managed resources

(Overrides TargetDispose(Boolean).) Flush

Flush any pending log messages (in case of asynchronous targets).

(Inherited from Target.) FlushAsync

Schedules notification of when all messages has been written

(Overrides TargetFlushAsync(AsyncContinuation).) GenerateUniqueItemName

Generates a new unique name, when duplicate names are detected

(Inherited from TargetWithContext.) GetAllProperties(LogEventInfo)

Creates combined dictionary of all configured properties for logEvent

(Inherited from TargetWithContext.) GetAllProperties(LogEventInfo, IDictionaryString, Object)

Creates combined dictionary of all configured properties for logEvent

(Inherited from TargetWithContext.) GetContextMdc (Inherited from TargetWithContext.) GetContextMdlc (Inherited from TargetWithContext.) GetContextNdc (Inherited from TargetWithContext.) GetContextNdlc (Inherited from TargetWithContext.) GetContextProperties(LogEventInfo)

Checks if any context properties, and if any returns them as a single dictionary

(Inherited from TargetWithContext.) GetContextProperties(LogEventInfo, IDictionaryString, Object)

Checks if any context properties, and if any returns them as a single dictionary

(Inherited from TargetWithContext.) InitializeTarget

Initializes the internal queue for pending logevents

(Overrides TargetInitializeTarget.) MergeEventProperties Obsolete.

Merges (copies) the event context properties from any event info object stored in parameters of the given event info object.

(Inherited from Target.) PrecalculateVolatileLayouts

Calls the

Precalculate(LogEventInfo)

on each volatile layout used by this target. This method won't prerender if all layouts in this target are thread-agnostic.

(Inherited from Target.) RenderLogEvent

Renders the event info in layout.

(Inherited from Target.) RetryFailedAsyncTask

Handle cleanup after failed write operation

SerializeItemValue

Take snapshot of a single object value

(Inherited from TargetWithContext.) SerializeMdcItem (Inherited from TargetWithContext.) SerializeMdlcItem (Inherited from TargetWithContext.) SerializeNdcItem (Inherited from TargetWithContext.) SerializeNdlcItem (Inherited from TargetWithContext.) ShouldIncludeProperties

Check if logevent has properties (or context properties)

(Inherited from TargetWithContext.) ToString

Returns a

String

that represents this instance.

(Inherited from Target.) Write(AsyncLogEventInfo)

Schedules the LogEventInfo for async writing

(Overrides TargetWrite(AsyncLogEventInfo).) Write(AsyncLogEventInfo) Obsolete.

NOTE! Obsolete, instead override Write(IList{AsyncLogEventInfo} logEvents) Writes an array of logging events to the log target. By default it iterates on all events and passes them to "Write" method. Inheriting classes can use this method to optimize batch writes.

(Inherited from Target.) Write(IListAsyncLogEventInfo)

Writes an array of logging events to the log target. By default it iterates on all events and passes them to "Write" method. Inheriting classes can use this method to optimize batch writes.

(Inherited from Target.) Write(LogEventInfo)

Writes logging event to the log target. Must be overridden in inheriting classes.

(Inherited from Target.) WriteAsyncLogEvent

Writes the log to the target.

(Inherited from Target.) WriteAsyncLogEvents(AsyncLogEventInfo)

Writes the array of log events.

(Inherited from Target.) WriteAsyncLogEvents(IListAsyncLogEventInfo)

Writes the array of log events.

(Inherited from Target.) WriteAsyncTask(LogEventInfo, CancellationToken)

Override this to create the actual logging task

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}
WriteAsyncTask(IListLogEventInfo, CancellationToken)

Override this to create the actual logging task for handling batch of logevents

WriteAsyncThreadSafe(AsyncLogEventInfo) (Overrides TargetWriteAsyncThreadSafe(AsyncLogEventInfo).) WriteAsyncThreadSafe(AsyncLogEventInfo) Obsolete.

NOTE! Obsolete, instead override WriteAsyncThreadSafe(IList{AsyncLogEventInfo} logEvents) Writes an array of logging events to the log target, in a thread safe manner. !WARNING! Custom targets should only override this method if able to provide their own synchronization mechanism.

Layout

-objects are not guaranteed to be thread-safe, so using them without a SyncRoot-object can be dangerous.

(Inherited from Target.) WriteAsyncThreadSafe(IListAsyncLogEventInfo)

Writes an array of logging events to the log target, in a thread safe manner. Any override of this method has to provide their own synchronization mechanism. !WARNING! Custom targets should only override this method if able to provide their own synchronization mechanism.

Layout

-objects are not guaranteed to be thread-safe, so using them without a SyncRoot-object can be dangerous.

(Inherited from Target.)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4