Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| be1e2041ff | |||
| e237a248ca |
+1
-1
Submodule ModeusSchedule.MSAuth updated: 5b906d6d07...89316e247f
@@ -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";
|
||||
|
||||
@@ -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<ConsoleFormatter, ConsoleFormatterOptions>();
|
||||
|
||||
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<string, LogLevel>
|
||||
{
|
||||
{ "Default", LogLevel.Error },
|
||||
{ "SfeduSchedule.Jobs.UpdateJwtJob", LogLevel.Information },
|
||||
{ "Program", LogLevel.Information },
|
||||
{ "Quartz", LogLevel.Warning }
|
||||
};
|
||||
});
|
||||
#endregion
|
||||
|
||||
builder.WebHost.UseSentry(options =>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<PackageReference Include="Sentry.AspNetCore" Version="6.1.0"/>
|
||||
<PackageReference Include="Sentry.Profiling" Version="6.1.0"/>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.6"/>
|
||||
<PackageReference Include="X.Extensions.Logging.Telegram" Version="2.0.2"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user