From 56d6234f1ca3dd934931805105ad1be8a1ec9d64 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 21 Sep 2025 15:17:18 +0800 Subject: [PATCH] Initialize logger after data path initialization during portable clean up --- Flow.Launcher/App.xaml.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 8ec11e5ff..e4ff3e9b3 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -183,8 +183,6 @@ namespace Flow.Launcher // So set to OnExplicitShutdown to prevent the application from shutting down before main window is created Current.ShutdownMode = ShutdownMode.OnExplicitShutdown; - Log.SetLogLevel(_settings.LogLevel); - // Update dynamic resources base on settings Current.Resources["SettingWindowFont"] = new FontFamily(_settings.SettingWindowFont); Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(_settings.SettingWindowFont); @@ -197,8 +195,12 @@ namespace Flow.Launcher // Initialize language before portable clean up since it needs translations await _internationalization.InitializeLanguageAsync(); + // Clean up after portability updates Ioc.Default.GetRequiredService().PreStartCleanUpAfterPortabilityUpdate(); + // Initialize logger after data path initialization during portable clean up + Log.SetLogLevel(_settings.LogLevel); + API.LogInfo(ClassName, "Begin Flow Launcher startup ----------------------------------------------------"); API.LogInfo(ClassName, $"Runtime info:{ErrorReporting.RuntimeInfo()}");