登录到AzureTableStorage会导致阻止下一次调用的开销,与登录文件时相比,是否有办法使此过程更快(批处理或异步选项)?
appsetttings.josn中的代码:
"Serilog": {
"MinimumLevel": "Information",
"WriteTo": [
{
"Name": "AzureTableStorage",
"Args": {
"storageTableName": "tbl",
"connectionString": "DefaultEndpointsProtocol=http;AccountName=xxx;AccountKey=/xxxxxxxx"
}
}
]
}
答案 0 :(得分:2)
我最终使用https://github.com/serilog/serilog-sinks-async
和AzureTableStorage中的批处理选项,类似于:
"WriteTo": [
{
"Name": "Async",
"Args": {
"configure": [
{
"Name": "AzureTableStorage",
"Args": {
"storageTableName": "tbl",
"connectionString": "DefaultEndpointsProtocol=http;AccountName=xxx;AccountKey=xxx"
}
}
]
}
}
]