src/Serilog.Sinks.MSSqlServer/Configuration/Extensions/System.Configuration/LoggerConfigurationMSSqlServerExtensions.cs
/// <summary>
/// Adds a sink that writes log events to a table in a MSSqlServer database.
/// Create a database and execute the table creation script found here
/// https://gist.github.com/mivano/10429656
/// or use the autoCreateSqlTable option.
///
/// Note: this is the legacy version of the extension method. Please use the new one using SinkOptions instead.
/// 
/// </summary>
/// <param name="loggerAuditSinkConfiguration">The logger configuration.</param>
/// <param name="connectionString">The connection string to the database where to store the events.</param>
/// <param name="tableName">Name of the table to store the events in.</param>
/// <param name="schemaName">Name of the schema for the table to store the data in. The default is 'dbo'.</param>
/// <param name="restrictedToMinimumLevel">The minimum log event level required in order to write an event to the sink.</param>
/// <param name="formatProvider">Supplies culture-specific formatting information, or null.</param>
/// <param name="autoCreateSqlTable">Create log table with the provided name on destination sql server.</param>
/// <param name="columnOptions"></param>
/// <param name="logEventFormatter">Supplies custom formatter for the LogEvent column, or null</param>
/// <returns>Logger configuration, allowing configuration to continue.</returns>
/// <exception cref="ArgumentNullException">A required parameter is null.</exception>
Adds a sink that writes log events to a table in a MSSqlServer database.

this is the legacy version of the extension method. Please use the new one using SinkOptions instead.
Adds a sink that writes log events to a table in a MSSqlServer database . this is the legacy version of the extension method . Please use the new one using SinkOptions instead .
public static LoggerConfiguration MSSqlServer(
            this LoggerAuditSinkConfiguration loggerAuditSinkConfiguration,
            string connectionString,
            string tableName,
            string schemaName = MSSqlServerSink.DefaultSchemaName,
            LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum,
            IFormatProvider formatProvider = null,
            bool autoCreateSqlTable = false,
            ColumnOptions columnOptions = null,
            ITextFormatter logEventFormatter = null)
        {
            var sinkOptions = new SinkOptions(tableName, null, null, autoCreateSqlTable, schemaName);
            return loggerAuditSinkConfiguration.MSSqlServer(
                connectionString: connectionString,
                sinkOptions: sinkOptions,
                restrictedToMinimumLevel: restrictedToMinimumLevel,
                formatProvider: formatProvider,
                columnOptions: columnOptions,
                logEventFormatter: logEventFormatter);
        }
public static LoggerConfiguration MSSqlServer ( this LoggerAuditSinkConfiguration loggerAuditSinkConfiguration , string connectionString , string tableName , string schemaName = MSSqlServerSink . DefaultSchemaName , LogEventLevel restrictedToMinimumLevel = LevelAlias . Minimum , IFormatProvider formatProvider = null , bool autoCreateSqlTable = false , ColumnOptions columnOptions = null , ITextFormatter logEventFormatter = null ) { var sinkOptions = new SinkOptions ( tableName , null , null , autoCreateSqlTable , schemaName ) ; return loggerAuditSinkConfiguration . MSSqlServer ( connectionString : connectionString , sinkOptions : sinkOptions , restrictedToMinimumLevel : restrictedToMinimumLevel , formatProvider : formatProvider , columnOptions : columnOptions , logEventFormatter : logEventFormatter ) ; }
Adds a sink that writes log events to a table in a MSSqlServer database.
Adds a sink that writes log events to a table in a MSSqlServer database .
// Do not add new parameters here. This interface is considered legacy and will be deprecated in the future. // For adding new input parameters use the SinkOptions class and the method overload that accepts SinkOptions.
Logger configuration, allowing configuration to continue.
Logger configuration allowing configuration to continue .
A required parameter is null.
A required parameter is null .
LoggerAuditSinkConfiguration
this
connectionString
string
The connection string to the database where to store the events.
The connection string to the database where to store the events .
tableName
string
Name of the table to store the events in.
Name of the table to store the events in .
schemaName
string
Name of the schema for the table to store the data in. The default is 'dbo'.
Name of the schema for the table to store the data in . The default is ' dbo ' .
restrictedToMinimumLevel
LogEventLevel
The minimum log event level required in order to write an event to the sink.
The minimum log event level required in order to write an event to the sink .
formatProvider
IFormatProvider
Supplies culture-specific formatting information, or null.
Supplies culture - specific formatting information or null .
autoCreateSqlTable
bool
Create log table with the provided name on destination sql server.
Create log table with the provided name on destination sql server .
columnOptions
ColumnOptions
None
logEventFormatter
ITextFormatter
Supplies custom formatter for the LogEvent column, or null
Supplies custom formatter for the LogEvent column or null
loggerAuditSinkConfiguration
The logger configuration.
The logger configuration .