/serilog-sinks-azuretablestorage

A Serilog sink that writes events to Azure Table Storage

Primary LanguageC#Apache License 2.0Apache-2.0

Serilog.Sinks.AzureTableStorage Build status

Writes to a table in Windows Azure Table Storage.

Package - Serilog.Sinks.AzureTableStorage | Platforms - .NET 4.5

var storage = CloudStorageAccount.FromConfigurationSetting("MyStorage");

var log = new LoggerConfiguration()
    .WriteTo.AzureTableStorage(storage)
    .CreateLogger();

JSON configuration

It is possible to configure the sink using Serilog.Settings.Configuration by specifying the table name and connection string in appsettings.json:

"Serilog": {
  "WriteTo": [
    {"Name": "AzureTableStorage", "Args": {"storageTableName": "", "connectionString": ""}}
  ]
}

JSON configuration must be enabled using ReadFrom.Configuration(); see the documentation of the JSON configuration package for details.