Property | Type | Description | |
---|---|---|---|
CloseConnection | void | ||
EnsureConnectionOpen | void | ||
InitializeTarget | void | ||
OpenConnection | IDbConnection | ||
RunInstallCommands | void | ||
WriteEventToDatabase | void |
Method | Description | |
---|---|---|
DatabaseTarget ( ) : System |
Initializes a new instance of the DatabaseTarget class.
|
|
DatabaseTarget ( string name ) : System |
Initializes a new instance of the DatabaseTarget class.
|
|
Install ( |
Performs installation which requires administrative permissions.
|
|
IsInstalled ( |
Determines whether the item is installed.
|
|
Uninstall ( |
Performs uninstallation which requires administrative permissions.
|
Method | Description | |
---|---|---|
BuildConnectionString ( LogEventInfo logEvent ) : string |
Build the connectionstring from the properties. Using ConnectionString at first, and falls back to the properties DBHost, DBUserName, DBPassword and DBDatabase |
|
CloseTarget ( ) : void |
Closes the target and releases any unmanaged resources.
|
|
Write ( AsyncLogEventInfo logEvents ) : void |
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 logEvent ) : void |
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.
|
Method | Description | |
---|---|---|
CloseConnection ( ) : void | ||
EnsureConnectionOpen ( string connectionString ) : void | ||
InitializeTarget ( ) : void | ||
OpenConnection ( string connectionString ) : IDbConnection | ||
RunInstallCommands ( |
||
WriteEventToDatabase ( LogEventInfo logEvent ) : void |
protected BuildConnectionString ( LogEventInfo logEvent ) : string | ||
logEvent | LogEventInfo | Event to render the layout inside the properties. |
return | string |
public DatabaseTarget ( string name ) : System | ||
name | string | Name of the target. |
return | System |
public Install ( |
||
installationContext | The installation context. | |
return | void |
public IsInstalled ( |
||
installationContext | The installation context. | |
return | bool? |
public Uninstall ( |
||
installationContext | The installation context. | |
return | void |
protected Write ( AsyncLogEventInfo logEvents ) : void | ||
logEvents | AsyncLogEventInfo | Logging events to be written out. |
return | void |
protected Write ( LogEventInfo logEvent ) : void | ||
logEvent | LogEventInfo | The logging event. |
return | void |