Click or drag to resize

DatabaseTarget Methods

The DatabaseTarget type exposes the following members.

Methods
  NameDescription
Protected methodBuildConnectionString
Build the connectionstring from the properties.
Protected methodCloseTarget
Closes the target to release any initialized resources
(Overrides TargetCloseTarget.)
Protected methodCreateDatabaseParameter
Create database parameter
Public methodDispose
Closes the target.
(Inherited from Target.)
Protected methodDispose(Boolean)
Releases unmanaged and - optionally - managed resources.
(Inherited from Target.)
Public methodFlush
Flush any pending log messages (in case of asynchronous targets).
(Inherited from Target.)
Protected methodFlushAsync
Flush any pending log messages
(Inherited from Target.)
Protected methodGetDatabaseParameterValue
Extract parameter value from the logevent
Protected methodInitializeTarget
Initializes the target before writing starts
(Overrides TargetInitializeTarget.)
Public methodInstall
Performs installation which requires administrative permissions.
Public methodIsInstalled
Determines whether the item is installed.
Public methodPrecalculateVolatileLayouts
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.)
Protected methodRenderLogEvent(Layout, LogEventInfo)
Renders the logevent into a string-result using the provided layout
(Inherited from Target.)
Protected methodRenderLogEventT(LayoutT, LogEventInfo, T)
Renders the logevent into a result-value by using the provided layout
(Inherited from Target.)
Protected methodResolveServiceT
Resolve from DI ServiceRepository
(Inherited from Target.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Target.)
Public methodUninstall
Performs uninstallation which requires administrative permissions.
Protected methodWrite(AsyncLogEventInfo)
Writes async log event to the log target.
(Inherited from Target.)
Protected methodWrite(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.
(Overrides TargetWrite(IListAsyncLogEventInfo).)
Protected methodWrite(LogEventInfo)
Writes the specified logging event to the database. It creates a new database command, prepares parameters for it by calculating layouts and executes the command.
(Overrides TargetWrite(LogEventInfo).)
Public methodWriteAsyncLogEvent
Writes the log to the target.
(Inherited from Target.)
Public methodWriteAsyncLogEvents(AsyncLogEventInfo)
Writes the array of log events.
(Inherited from Target.)
Public methodWriteAsyncLogEvents(IListAsyncLogEventInfo)
Writes the array of log events.
(Inherited from Target.)
Protected methodWriteAsyncThreadSafe(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.)
Protected methodWriteAsyncThreadSafe(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.)
Protected methodWriteFailedNotInitialized
LogEvent is written to target, but target failed to successfully initialize
(Inherited from Target.)
Top
See Also