From be1e2041ff7ac1fbb18915d3b755e12616dfe6ca Mon Sep 17 00:00:00 2001 From: Sergey Karmanov Date: Mon, 4 May 2026 12:27:38 +0300 Subject: [PATCH] chore: Remove Telegram logging --- SfeduSchedule/AppConsts.cs | 4 ---- SfeduSchedule/Program.cs | 21 --------------------- SfeduSchedule/SfeduSchedule.csproj | 1 - 3 files changed, 26 deletions(-) diff --git a/SfeduSchedule/AppConsts.cs b/SfeduSchedule/AppConsts.cs index f06f113..e1eca3a 100644 --- a/SfeduSchedule/AppConsts.cs +++ b/SfeduSchedule/AppConsts.cs @@ -11,10 +11,6 @@ public static class AppConsts public const string ModeusUrlEnv = "MODEUS_URL"; public const string ModeusDefaultUrl = "https://sfedu.modeus.org/"; - // Telegram - public const string TgChatIdEnv = "TG_CHAT_ID"; - public const string TgTokenEnv = "TG_TOKEN"; - // RateLimiter public const string PermitLimitEnv = "PERMIT_LIMIT"; public const string TimeLimitEnv = "TIME_LIMIT"; diff --git a/SfeduSchedule/Program.cs b/SfeduSchedule/Program.cs index 7e3f5e7..0c2b21e 100644 --- a/SfeduSchedule/Program.cs +++ b/SfeduSchedule/Program.cs @@ -18,7 +18,6 @@ using SfeduSchedule.Jobs; using SfeduSchedule.Logging; using SfeduSchedule.Middleware; using SfeduSchedule.Services; -using X.Extensions.Logging.Telegram.Extensions; using IPNetwork = Microsoft.AspNetCore.HttpOverrides.IPNetwork; var builder = WebApplication.CreateBuilder(args); @@ -59,26 +58,6 @@ builder.Logging.AddConsole(options => options.FormatterName = "CustomConsoleForm .AddConsoleFormatter(); builder.Logging.AddFilter("Quartz", LogLevel.Warning); -if (!string.IsNullOrEmpty(configuration[AppConsts.TgChatIdEnv]) && !string.IsNullOrEmpty(configuration[AppConsts.TgTokenEnv])) - builder.Logging.AddTelegram(options => - { - options.FormatterConfiguration = new X.Extensions.Logging.Telegram.Base.Configuration.FormatterConfiguration - { - IncludeException = true, - IncludeProperties = true, - }; - options.ChatId = configuration[AppConsts.TgChatIdEnv]!; - options.AccessToken = configuration[AppConsts.TgTokenEnv]!; - options.FormatterConfiguration.UseEmoji = true; - options.FormatterConfiguration.ReadableApplicationName = "Modeus Schedule Proxy"; - options.LogLevel = new Dictionary - { - { "Default", LogLevel.Error }, - { "SfeduSchedule.Jobs.UpdateJwtJob", LogLevel.Information }, - { "Program", LogLevel.Information }, - { "Quartz", LogLevel.Warning } - }; - }); #endregion builder.WebHost.UseSentry(options => diff --git a/SfeduSchedule/SfeduSchedule.csproj b/SfeduSchedule/SfeduSchedule.csproj index 5f33c6c..9961dfc 100644 --- a/SfeduSchedule/SfeduSchedule.csproj +++ b/SfeduSchedule/SfeduSchedule.csproj @@ -17,7 +17,6 @@ -