Can the Azure Table Storage sink for Serilog be configured via the app/Web.config like other sinks, eg Elasticsearch and Seq, which can be configured from the configuration files.
The github page for AzureTableStorage sink shows only code based configuration.
Thanks
答案 0 :(得分:2)
我能够弄清楚这一点:
<add key="serilog:using" value="Serilog.Sinks.AzureTableStorage" />
<add key="serilog:write-to:AzureTableStorageWithProperties.connectionString" value="DefaultEndpointsProtocol=https;AccountName=someaccount;AccountKey=uJeYNoa/4dKKtH3zG+7YlA==;EndpointSuffix=core.windows.net" />
<add key="serilog:write-to:AzureTableStorageWithProperties.storageTableName" value="my-logs" />
有了这个,我能够看到StorageExplorer中的日志