From f761605bfcddfe025b24e391768afc24f6571373 Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:25:50 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=A2=9E=E5=8A=A0=20ResourceUpdater?= =?UTF-8?q?=20=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Models/ResourceUpdater.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/MaaWpfGui/Models/ResourceUpdater.cs b/src/MaaWpfGui/Models/ResourceUpdater.cs index 9e9b8c3e3c..0efad40164 100644 --- a/src/MaaWpfGui/Models/ResourceUpdater.cs +++ b/src/MaaWpfGui/Models/ResourceUpdater.cs @@ -24,12 +24,15 @@ using MaaWpfGui.Constants; using MaaWpfGui.Helper; using MaaWpfGui.Main; using MaaWpfGui.ViewModels; +using Serilog; using Stylet; namespace MaaWpfGui.Models { public static class ResourceUpdater { + private static readonly ILogger _logger = Log.ForContext("SourceContext", "ResourceUpdater"); + private const string MaaResourceVersion = "resource/version.json"; private const string VersionChecksTemp = MaaResourceVersion + ".checks.tmp"; @@ -371,6 +374,11 @@ namespace MaaWpfGui.Models } while (retryCount++ < maxRetryTime); + if (updateResult == UpdateResult.Failed) + { + _logger.Warning($"Failed to get file, url: {url}, saveTo: {saveTo}"); + } + return updateResult; }