@@ -145,21 +145,30 @@ export class WindowsApplicationManager extends ApplicationManagerBase {
145145
146146 /**
147147 * Returns the path of the runtime's trace log for the most recently started app.
148- * Inside a UWP process, Win32 GetTempPathW() virtualises to AC\Temp (the app
149- * container's isolated temp folder) — NOT the WinRT TemporaryFolder (TempState).
150- * Rust's std::env::temp_dir() calls GetTempPathW(), so the DLL writes to AC\Temp.
148+ * Inside a UWP process, Win32 GetTempPathW() virtualises
149+ * to AC\Temp (the app container's isolated temp folder). Rust's
150+ * std::env::temp_dir() calls GetTempPathW(), so the DLL writes to AC\Temp.
151151 * Falls back to the system temp path when no PFN is known (unpackaged EXE).
152152 */
153153 public getLogFilePath ( ) : string {
154- const systemTempLog = path . join ( os . tmpdir ( ) , "ns_trace.log" ) ;
154+ const systemConsoleLog = path . join ( os . tmpdir ( ) , "console.log" ) ;
155+ const systemLegacyLog = path . join ( os . tmpdir ( ) , "ns_trace.log" ) ;
156+
155157 if ( this . _packageFamilyNames . size > 0 ) {
156158 const pfn = this . _packageFamilyNames . values ( ) . next ( ) . value as string ;
157159 const localAppData = process . env . LOCALAPPDATA ;
158160 if ( localAppData && pfn ) {
159- return path . join ( localAppData , "Packages" , pfn , "AC" , "Temp" , "ns_trace.log" ) ;
161+ const consolePath = path . join ( localAppData , "Packages" , pfn , "AC" , "Temp" , "console.log" ) ;
162+ const legacyPath = path . join ( localAppData , "Packages" , pfn , "AC" , "Temp" , "ns_trace.log" ) ;
163+ if ( fs . existsSync ( consolePath ) ) return consolePath ;
164+ if ( fs . existsSync ( legacyPath ) ) return legacyPath ;
165+ return consolePath ;
160166 }
161167 }
162- return systemTempLog ;
168+
169+ if ( fs . existsSync ( systemConsoleLog ) ) return systemConsoleLog ;
170+ if ( fs . existsSync ( systemLegacyLog ) ) return systemLegacyLog ;
171+ return systemConsoleLog ;
163172 }
164173
165174 /**
0 commit comments