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();
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.