FileTarget Methods |
The FileTarget type exposes the following members.
Name | Description | |
---|---|---|
CalculateNextWeekday |
Calculate the DateTime of the requested day of the week.
| |
CleanupInitializedFiles |
Removes records of initialized files that have not been
accessed in the last two days.
| |
CleanupInitializedFiles(DateTime) |
Removes records of initialized files that have not been
accessed after the specified date.
| |
CloseTarget |
Closes the file(s) opened for writing.
(Overrides TargetCloseTarget.) | |
Dispose |
Closes the target.
(Inherited from Target.) | |
Dispose(Boolean) |
Releases unmanaged and - optionally - managed resources.
(Inherited from Target.) | |
Flush |
Flush any pending log messages (in case of asynchronous targets).
(Inherited from Target.) | |
FlushAsync |
Flushes all pending file operations.
(Overrides TargetFlushAsync(AsyncContinuation).) | |
InitializeTarget |
Initializes file logging by creating data structures that
enable efficient multi-file logging.
(Overrides TargetInitializeTarget.) | |
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.) | |
RenderFormattedMessage |
Formats the log event for write.
| |
RenderFormattedMessageToStream |
Gets the bytes to be written to the file.
| |
RenderLogEvent(Layout, LogEventInfo) |
Renders the logevent into a string-result using the provided layout
(Inherited from Target.) | |
RenderLogEventT(LayoutT, LogEventInfo, T) |
Renders the logevent into a result-value by using the provided layout
(Inherited from Target.) | |
ResolveServiceT |
Resolve from DI ServiceRepository (Inherited from Target.) | |
ToString | Returns a string that represents the current object. (Inherited from Target.) | |
TransformStream |
Modifies the specified byte array before it gets sent to a file.
| |
Write(AsyncLogEventInfo) |
Writes async log event to the log target.
(Inherited from Target.) | |
Write(IListAsyncLogEventInfo) |
Writes the specified array of logging events to a file specified in the FileName
parameter.
(Overrides TargetWrite(IListAsyncLogEventInfo).) | |
Write(LogEventInfo) |
Writes the specified logging event to a file specified in the FileName
parameter.
(Overrides TargetWrite(LogEventInfo).) | |
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.) | |
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.
(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.) | |
WriteFailedNotInitialized |
LogEvent is written to target, but target failed to successfully initialize
(Inherited from Target.) |