Skip to content

Commit d296f27

Browse files
committed
update readme
1 parent 49db4af commit d296f27

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

README.md

+20-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,26 @@ var log = new LoggerConfiguration()
99
.CreateLogger();
1010
```
1111

12+
## Configuration
13+
14+
| Configuration | Description | Default |
15+
|-------------------------------|-------------------------------------------------------------------------------------|---------------------------|
16+
| connectionString | The Cloud Storage Account connection string | |
17+
| sharedAccessSignature | The storage account/table SAS key | |
18+
| accountName | The storage account name | |
19+
| restrictedToMinimumLevel | The minimum log event level required in order to write an event to the sink. | Verbose |
20+
| formatProvider | Culture-specific formatting information | |
21+
| storageTableName | Table name that log entries will be written to | LogEvent |
22+
| writeInBatches | Use a periodic batching sink, as opposed to a synchronous one-at-a-time sink | true |
23+
| batchPostingLimit | The maximum number of events to post in a single batch | 100 |
24+
| period | The time to wait between checking for event batches | 0:0:2 |
25+
| keyGenerator | The key generator used to create the PartitionKey and the RowKey for each log entry | DefaultKeyGenerator |
26+
| propertyColumns | Specific log event properties to be written as table columns | |
27+
| bypassTableCreationValidation | Bypass the exception in case the table creation fails | false |
28+
| documentFactory | Provider to create table document from LogEvent | DefaultDocumentFactory |
29+
| tableClientFactory | Provider to create table client | DefaultTableClientFactory |
30+
| partitionKeyRounding | Partition key rounding time span | 0:5:0 |
31+
1232
### JSON configuration
1333

1434
It is possible to configure the sink using [Serilog.Settings.Configuration](https://github.com/serilog/serilog-settings-configuration) by specifying the table name and connection string in `appsettings.json`:
@@ -51,9 +71,6 @@ In your application's `App.config` or `Web.config` file, specify the file sink a
5171
</configuration>
5272
```
5373

54-
### Async approach
55-
It is possible to configure the collector using [Serilog.Sinks.Async](https://github.com/serilog/serilog-sinks-async) to have an async approach.
56-
5774
### Example Configuration for ASP.NET
5875

5976
```c#

src/Serilog.Sinks.AzureTableStorage/Sinks/AzureTableStorage/DefaultTableClientFactory.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public TableClient CreateTableClient(AzureTableStorageSinkOptions options, Table
2929
if (tableServiceClient is null)
3030
throw new ArgumentNullException(nameof(tableServiceClient));
3131

32-
var tableName = options.StorageTableName ?? "LogEvent";
3332

3433
if (_tableClient != null)
3534
return _tableClient;
3635

36+
var tableName = options.StorageTableName ?? "LogEvent";
3737
_tableClient = tableServiceClient.GetTableClient(tableName);
3838

3939
try

0 commit comments

Comments
 (0)