diff --git a/Console.Advanced/Console.Advanced.csproj b/Console.Advanced/Console.Advanced.csproj index d433e11..5a0e133 100644 --- a/Console.Advanced/Console.Advanced.csproj +++ b/Console.Advanced/Console.Advanced.csproj @@ -1,15 +1,15 @@ - net6.0 + net8.0 Exe enable enable - - + + diff --git a/Console.Advanced/Program.cs b/Console.Advanced/Program.cs index a74e839..db59156 100644 --- a/Console.Advanced/Program.cs +++ b/Console.Advanced/Program.cs @@ -13,7 +13,7 @@ // More read: // https://docs.microsoft.com/en-us/aspnet/core/fundamentals/http-requests?view=aspnetcore-5.0#typed-clients // https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests - services.AddHttpClient("telegram_bot_client") + services.AddHttpClient("telegram_bot_client").RemoveAllLoggers() .AddTypedClient((httpClient, sp) => { BotConfiguration? botConfig = sp.GetConfiguration(); diff --git a/Webhook.MinimalAPIs/Program.cs b/Webhook.MinimalAPIs/Program.cs index 41f3b53..591b055 100644 --- a/Webhook.MinimalAPIs/Program.cs +++ b/Webhook.MinimalAPIs/Program.cs @@ -6,7 +6,7 @@ var webhookUrl = builder.Configuration.GetValue("BotWebhookUrl", "{set your bot webhook url in appsettings.json")!; builder.Services.ConfigureTelegramBot(opt => opt.SerializerOptions); -builder.Services.AddHttpClient("tgwebhook").AddTypedClient(httpClient => new TelegramBotClient(token, httpClient)); +builder.Services.AddHttpClient("tgwebhook").RemoveAllLoggers().AddTypedClient(httpClient => new TelegramBotClient(token, httpClient)); var app = builder.Build(); app.UseHttpsRedirection();