Target Methods |
The Target type exposes the following members.
Name | Description | |
---|---|---|
CloseTarget |
Closes the target to release any initialized resources
| |
Dispose |
Closes the target.
| |
Dispose(Boolean) |
Releases unmanaged and - optionally - managed resources.
| |
Flush |
Flush any pending log messages (in case of asynchronous targets).
| |
FlushAsync |
Flush any pending log messages
| |
InitializeTarget |
Initializes the target before writing starts
| |
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.
| |
RenderLogEvent(Layout, LogEventInfo) |
Renders the logevent into a string-result using the provided layout
| |
RenderLogEventT(LayoutT, LogEventInfo, T) |
Renders the logevent into a result-value by using the provided layout
| |
ResolveServiceT |
Resolve from DI ServiceRepository | |
ToString | Returns a string that represents the current object. (Overrides ObjectToString.) | |
Write(AsyncLogEventInfo) |
Writes async log event to the log 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.
| |
Write(LogEventInfo) |
Writes logging event to the target destination
| |
WriteAsyncLogEvent |
Writes the log to the target.
| |
WriteAsyncLogEvents(AsyncLogEventInfo) |
Writes the array of log events.
| |
WriteAsyncLogEvents(IListAsyncLogEventInfo) |
Writes the array of log events.
| |
WriteAsyncThreadSafe(AsyncLogEventInfo) |
Writes a log event 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.
| |
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.
| |
WriteFailedNotInitialized |
LogEvent is written to target, but target failed to successfully initialize
|