Skip to content

Commit 56d6234

Browse files
committed
Initialize logger after data path initialization during portable clean up
1 parent 81dcadb commit 56d6234

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Flow.Launcher/App.xaml.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ await API.StopwatchLogInfoAsync(ClassName, "Startup cost", async () =>
183183
// So set to OnExplicitShutdown to prevent the application from shutting down before main window is created
184184
Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;
185185

186-
Log.SetLogLevel(_settings.LogLevel);
187-
188186
// Update dynamic resources base on settings
189187
Current.Resources["SettingWindowFont"] = new FontFamily(_settings.SettingWindowFont);
190188
Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(_settings.SettingWindowFont);
@@ -197,8 +195,12 @@ await API.StopwatchLogInfoAsync(ClassName, "Startup cost", async () =>
197195
// Initialize language before portable clean up since it needs translations
198196
await _internationalization.InitializeLanguageAsync();
199197

198+
// Clean up after portability updates
200199
Ioc.Default.GetRequiredService<Portable>().PreStartCleanUpAfterPortabilityUpdate();
201200

201+
// Initialize logger after data path initialization during portable clean up
202+
Log.SetLogLevel(_settings.LogLevel);
203+
202204
API.LogInfo(ClassName, "Begin Flow Launcher startup ----------------------------------------------------");
203205
API.LogInfo(ClassName, $"Runtime info:{ErrorReporting.RuntimeInfo()}");
204206

0 commit comments

Comments
 (0)