diff --git a/CompatBot/Program.cs b/CompatBot/Program.cs index 557c4911..aa3876be 100644 --- a/CompatBot/Program.cs +++ b/CompatBot/Program.cs @@ -100,15 +100,24 @@ internal static class Program } } +#if DEBUG + Config.Log.Debug("Upgrading databases…"); +#endif if (!await DbImporter.UpgradeAsync(Config.Cts.Token).ConfigureAwait(false)) return; +#if DEBUG + Config.Log.Debug("Restoring configuration and stats…"); +#endif await SqlConfiguration.RestoreAsync().ConfigureAwait(false); Config.Log.Debug("Restored configuration variables from persistent storage"); await StatsStorage.RestoreAsync().ConfigureAwait(false); Config.Log.Debug("Restored stats from persistent storage"); +#if DEBUG + Config.Log.Debug("Starting background tasks…"); +#endif var backgroundTasks = Task.WhenAll( AmdDriverVersionProvider.RefreshAsync(), #if !DEBUG @@ -125,6 +134,9 @@ internal static class Program OcrProvider.InitializeAsync(Config.Cts.Token) ); +#if DEBUG + Config.Log.Debug("Checking IRD cache folder…"); +#endif try { if (!Directory.Exists(Config.IrdCachePath)) @@ -135,6 +147,9 @@ internal static class Program Config.Log.Warn(e, $"Failed to create new folder {Config.IrdCachePath}: {e.Message}"); } +#if DEBUG + Config.Log.Debug("Configuring Discord client…"); +#endif var clientInfoLogged = false; var mediaScreenshotMonitor = new MediaScreenshotMonitor(); var clientBuilder = DiscordClientBuilder @@ -308,6 +323,7 @@ internal static class Program try { + Config.Log.Debug("Connecting…"); await client.ConnectAsync().ConfigureAwait(false); } catch (Exception e) @@ -316,6 +332,9 @@ internal static class Program throw; } +#if DEBUG + Config.Log.Info("Checking restart state…"); +#endif ulong? channelId = null; string? restartMsg = null; await using (var wdb = await BotDb.OpenWriteAsync().ConfigureAwait(false)) diff --git a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.cs b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.cs index c33fa38a..252f02e0 100644 --- a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.cs +++ b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.cs @@ -788,7 +788,7 @@ internal static partial class LogParserResult var link = updateInfo.X64?.LatestBuild.Windows?.Download ?? updateInfo.X64?.LatestBuild.Linux?.Download ?? updateInfo.X64?.LatestBuild.Mac?.Download - ??updateInfo.Arm?.LatestBuild.Windows?.Download + ?? updateInfo.Arm?.LatestBuild.Windows?.Download ?? updateInfo.Arm?.LatestBuild.Linux?.Download ?? updateInfo.Arm?.LatestBuild.Mac?.Download; if (updateInfo.ReturnCode is not StatusCode.UpdatesAvailable || link is null)