Не сохраняйте журналы для httpmessagehandler с помощью serilogC#

Место общения программистов C#
Anonymous
Не сохраняйте журналы для httpmessagehandler с помощью serilog

Сообщение Anonymous »

В моем веб -приложении ASP.NET Core я использую serilog для сохранения в SQL Server все журналы. После этого я вижу много подобных сообщений: < /p>

Код: Выделить всё

Ending HttpMessageHandler cleanup cycle after 0.0046ms - processed: 0 items - remaining: 8 items
Starting HttpMessageHandler cleanup cycle with 8 items
Ending HttpMessageHandler cleanup cycle after 0.0065ms - processed: 0 items - remaining: 8 items
Starting HttpMessageHandler cleanup cycle with 8 items
Ending HttpMessageHandler cleanup cycle after 0.0052ms - processed: 0 items - remaining: 8 items
Starting HttpMessageHandler cleanup cycle with 8 items
Ending HttpMessageHandler cleanup cycle after 0.0047ms - processed: 0 items - remaining: 8 items
I saw in other posts like this one to add this key in the appconfig.json

"Microsoft.Extensions.Http.DefaultHttpClientFactory": "Information"

my full file < /p>
{
"Serilog": {
"MinimumLevel": "Debug",
"Override": {
"Microsoft": "Information",
"Microsoft.Extensions.Http.DefaultHttpClientFactory": "Information"
},
"WriteTo": [
{
"Name": "MSSqlServer",
"Args": {
"connectionString": "Server=myerver",
"tableName": "mytable"
}
}
]
}
}
< /code>
Несмотря на эту конфигурацию, у меня есть много записей, таких как те, которые вверху. Что я должен изменить в конфигурации?

Подробнее здесь: https://stackoverflow.com/questions/796 ... ng-serilog

Вернуться в «C#»