<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="10.0.1-dev-00170" />

Serilog.Sinks.MSSqlServer.ColumnOptions

public class ColumnOptions
Options that pertain to columns

Options for the Exception column.

public class IdColumnOptions : SqlColumn

Options for the Id column.

Options for the Level column.

Options for the LogEvent column.

Options for the message column

Options for the MessageTemplate column.

Options for the Properties column.

Options for the SpanId column.

Options for the TimeStamp column.

Options for the TraceId column.

public ICollection<SqlColumn> AdditionalColumns { get; set; }

Additional log event property columns.

Deprecated. Use the AdditionalColumns collection instead. The sink constructor will migrate this collection to the new collection automatically until this feature is removed.

public bool ClusteredColumnstoreIndex { get; set; }

When true for auto-created tables, the table will be created with a Clustered Columnstore Index. In this case, if the Id column is set as the primary key but is not configured as a non-clustered index, it will not default to a clustered index. Prior to SQL Server 2017 you must NOT use any NVARCHAR(MAX) columns, and this restriction includes the Standard Columns (you must change their size).

public bool DisableTriggers { get; set; }

Indicates if triggers should be disabled when inserting log entries. Only applies when SqlBulkCopy is used.

public ExceptionColumnOptions Exception { get; set; }

Options for the Exception column.

public IdColumnOptions Id { get; }

Options for the Id column.

public LevelColumnOptions Level { get; }

Options for the Level column.

Options for the LogEvent column.

public MessageColumnOptions Message { get; set; }

Options for the Message column.

Options for the MessageTemplate column.

public SqlColumn PrimaryKey { get; set; }

The column which acts as the table's primary key. Primary keys must be non-null, the AllowNull property will always be forced to false. This can be a Standard Column or a custom column in the AdditionalColumns collection. This defaults to the Id column for backwards-compatibility reasons, but a primary key is optional. If the Id column is removed while the primary key is set to the Id column, no primary key is created. It is recommended to declare the primary key as a non-clustered index, although this is not done by default for backwards-compatibility reasons. If the primary key is not delcared as non-clustered and a Clustered Columnstore Index is not used, the primary key will be created as a clustered index.

Options for the Properties column.

public SpanIdColumnOptions SpanId { get; }

Options for the SpanId column.

public ICollection<StandardColumn> Store { get; set; }

A list of columns that will be stored in the logs table in the database.

Options for the TimeStamp column.

public TraceIdColumnOptions TraceId { get; }

Options for the TraceId column.

public ColumnOptions()

Default constructor.