Changed startup time measurement to use structured logging via ILogger
instead of Console.WriteLine. This provides:
- Consistent logging format with other app messages
- Proper log level (Information)
- Structured data (ElapsedMilliseconds as named parameter)
- Better integration with logging infrastructure
Output now appears as:
info: Electron.Startup[0]
App startup time until Electron launch: 1284 ms
Added 'Microsoft.AspNetCore.Watch.BrowserRefresh' to Warning level
to suppress the 'Middleware loaded' and 'Script injected' debug messages
that appear when running with dotnet watch or Ctrl+F5 from Visual Studio.
- Removed '|| ' prefix from ProcessRunner stdout/stderr redirection
* Changed to Debug.WriteLine (only visible when debugger attached)
- Suppressed [Startup] timing messages in StartupManager
* Moved to Debug.WriteLine for diagnostic purposes
- Suppressed 'No testhost detected' messages
- Added logging configuration to suppress ASP.NET Watch debug messages
* Microsoft.AspNetCore.Watch set to Warning level
Result: Clean console output in development with only meaningful messages.
Timing and debug traces still available when debugger is attached.
- Replaced Console.WriteLine with System.Diagnostics.Debug.WriteLine in:
* LaunchOrderDetector (probe scoring)
* UnpackagedDetector (probe scoring)
* ElectronProcessActive (StartInternal traces)
- Removed '[StartInternal]: after run:' trace
- Debug.WriteLine only outputs when debugger is attached
These were the noisiest debugging traces. Other Console.WriteLine usage
in StartupManager, ProcessRunner, etc. would require ILogger injection
which is a larger architectural change deferred for now.
- Removed 'Entry!!!:' debugging leftover from main.js
- Replaced all console.log/warn/error with logger methods
- Preserved console.time/timeEnd for performance measurements
- Updated browserWindows.js and webContents.js to use logger
- Changed debug traces to DEBUG level (won't show in production)
- Changed info messages to INFO level (show in development)
- All errors use ERROR level (always shown)
Socket.IO connection messages now respect log levels based on environment.