feat: Улучшил детализацию логов Telegram
All checks were successful
Create and publish a Docker image / Publish image (push) Successful in 6m14s

This commit is contained in:
2026-01-24 18:35:19 +03:00
parent 98705d6bbd
commit 39201e561f

View File

@@ -66,6 +66,11 @@ builder.Logging.AddFilter("Quartz", LogLevel.Warning);
if (!string.IsNullOrEmpty(tgChatId) && !string.IsNullOrEmpty(tgToken)) if (!string.IsNullOrEmpty(tgChatId) && !string.IsNullOrEmpty(tgToken))
builder.Logging.AddTelegram(options => builder.Logging.AddTelegram(options =>
{ {
options.FormatterConfiguration = new X.Extensions.Logging.Telegram.Base.Configuration.FormatterConfiguration
{
IncludeException = true,
IncludeProperties = true,
};
options.ChatId = tgChatId; options.ChatId = tgChatId;
options.AccessToken = tgToken; options.AccessToken = tgToken;
options.FormatterConfiguration.UseEmoji = true; options.FormatterConfiguration.UseEmoji = true;
@@ -288,6 +293,8 @@ if (string.IsNullOrEmpty(preinstalledJwtToken))
await scheduler.TriggerJob(jobKey); await scheduler.TriggerJob(jobKey);
} }
} }
else
logger.LogInformation("Используем предустановленный токен из конфигурации");
app.UseSwagger(); app.UseSwagger();
app.UseSwaggerUI(); app.UseSwaggerUI();