C# Class NLog.Targets.Wrappers.AsyncTargetWrapper

Inheritance: NLog.Targets.Wrappers.WrapperTargetBase
Afficher le fichier Open project: shiftkey/winrt-backport-hilarity Class Usage Examples

Private Properties

Свойство Type Description
ProcessPendingEvents void

Méthodes publiques

Méthode Description
AsyncTargetWrapper ( ) : System

Initializes a new instance of the AsyncTargetWrapper class.

AsyncTargetWrapper ( NLog.Target wrappedTarget ) : System

Initializes a new instance of the AsyncTargetWrapper class.

AsyncTargetWrapper ( NLog.Target wrappedTarget, int queueLimit, AsyncTargetWrapperOverflowAction overflowAction ) : System

Initializes a new instance of the AsyncTargetWrapper class.

Méthodes protégées

Méthode Description
CloseTarget ( ) : void

Shuts down the lazy writer timer.

FlushAsync ( AsyncContinuation asyncContinuation ) : void

Waits for the lazy writer thread to finish writing messages.

InitializeTarget ( ) : void

Initializes the target by starting the lazy writer timer.

StartLazyWriterTimer ( ) : void

Starts the lazy writer thread which periodically writes queued log messages.

StopLazyWriterThread ( ) : void

Starts the lazy writer thread.

Write ( AsyncLogEventInfo logEvent ) : void

Adds the log event to asynchronous queue to be processed by the lazy writer thread.

The Target.PrecalculateVolatileLayouts is called to ensure that the log event can be processed in another thread.

Private Methods

Méthode Description
ProcessPendingEvents ( object state ) : void

Method Details

AsyncTargetWrapper() public méthode

Initializes a new instance of the AsyncTargetWrapper class.
public AsyncTargetWrapper ( ) : System
Résultat System

AsyncTargetWrapper() public méthode

Initializes a new instance of the AsyncTargetWrapper class.
public AsyncTargetWrapper ( NLog.Target wrappedTarget ) : System
wrappedTarget NLog.Target The wrapped target.
Résultat System

AsyncTargetWrapper() public méthode

Initializes a new instance of the AsyncTargetWrapper class.
public AsyncTargetWrapper ( NLog.Target wrappedTarget, int queueLimit, AsyncTargetWrapperOverflowAction overflowAction ) : System
wrappedTarget NLog.Target The wrapped target.
queueLimit int Maximum number of requests in the queue.
overflowAction AsyncTargetWrapperOverflowAction The action to be taken when the queue overflows.
Résultat System

CloseTarget() protected méthode

Shuts down the lazy writer timer.
protected CloseTarget ( ) : void
Résultat void

FlushAsync() protected méthode

Waits for the lazy writer thread to finish writing messages.
protected FlushAsync ( AsyncContinuation asyncContinuation ) : void
asyncContinuation AsyncContinuation The asynchronous continuation.
Résultat void

InitializeTarget() protected méthode

Initializes the target by starting the lazy writer timer.
protected InitializeTarget ( ) : void
Résultat void

StartLazyWriterTimer() protected méthode

Starts the lazy writer thread which periodically writes queued log messages.
protected StartLazyWriterTimer ( ) : void
Résultat void

StopLazyWriterThread() protected méthode

Starts the lazy writer thread.
protected StopLazyWriterThread ( ) : void
Résultat void

Write() protected méthode

Adds the log event to asynchronous queue to be processed by the lazy writer thread.
The Target.PrecalculateVolatileLayouts is called to ensure that the log event can be processed in another thread.
protected Write ( AsyncLogEventInfo logEvent ) : void
logEvent AsyncLogEventInfo The log event.
Résultat void