From 570cff4590dad3ca8976f6b57aabf0c4d40e8063 Mon Sep 17 00:00:00 2001 From: Yu Leng Date: Thu, 11 Dec 2025 11:04:41 +0800 Subject: [PATCH] Remove redundant Logger initialization in App.xaml.cs Logger initialization is now handled in Program.cs before the App constructor, so the duplicate initialization in App.xaml.cs has been removed. A clarifying comment was added to document this change and improve startup sequence clarity. --- .../powerdisplay/PowerDisplay/PowerDisplayXAML/App.xaml.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/powerdisplay/PowerDisplay/PowerDisplayXAML/App.xaml.cs b/src/modules/powerdisplay/PowerDisplay/PowerDisplayXAML/App.xaml.cs index 737a9cf4dd..f57a0638a4 100644 --- a/src/modules/powerdisplay/PowerDisplay/PowerDisplayXAML/App.xaml.cs +++ b/src/modules/powerdisplay/PowerDisplay/PowerDisplayXAML/App.xaml.cs @@ -45,8 +45,7 @@ namespace PowerDisplay // Ensure types used in XAML are preserved for AOT compilation TypePreservation.PreserveTypes(); - // Initialize Logger - Logger.InitializeLogger("\\PowerDisplay\\Logs"); + // Note: Logger is already initialized in Program.cs before App constructor // Initialize PowerToys telemetry try