C# Класс NLog.Targets.Wrappers.AsyncTargetWrapper

Наследование: NLog.Targets.Wrappers.WrapperTargetBase
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ProcessPendingEvents void

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
ProcessPendingEvents ( object state ) : void

Описание методов

AsyncTargetWrapper() публичный Метод

Initializes a new instance of the AsyncTargetWrapper class.
public AsyncTargetWrapper ( ) : System
Результат System

AsyncTargetWrapper() публичный Метод

Initializes a new instance of the AsyncTargetWrapper class.
public AsyncTargetWrapper ( NLog.Target wrappedTarget ) : System
wrappedTarget NLog.Target The wrapped target.
Результат System

AsyncTargetWrapper() публичный Метод

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.
Результат System

CloseTarget() защищенный Метод

Shuts down the lazy writer timer.
protected CloseTarget ( ) : void
Результат void

FlushAsync() защищенный Метод

Waits for the lazy writer thread to finish writing messages.
protected FlushAsync ( AsyncContinuation asyncContinuation ) : void
asyncContinuation AsyncContinuation The asynchronous continuation.
Результат void

InitializeTarget() защищенный Метод

Initializes the target by starting the lazy writer timer.
protected InitializeTarget ( ) : void
Результат void

StartLazyWriterTimer() защищенный Метод

Starts the lazy writer thread which periodically writes queued log messages.
protected StartLazyWriterTimer ( ) : void
Результат void

StopLazyWriterThread() защищенный Метод

Starts the lazy writer thread.
protected StopLazyWriterThread ( ) : void
Результат void

Write() защищенный Метод

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.
Результат void