fix: replace all Debug.WriteLine with ILogger across src/design/#765
Merged
dangershony merged 1 commit intomainfrom Apr 18, 2026
Merged
fix: replace all Debug.WriteLine with ILogger across src/design/#765dangershony merged 1 commit intomainfrom
dangershony merged 1 commit intomainfrom
Conversation
Migrate all 27 instances of System.Diagnostics.Debug.WriteLine to proper ILogger infrastructure using the project's existing patterns: lazy static loggers for static classes, ILoggerFactory resolution from App.Services for view code-behind, and constructor-injected ILogger<T> for ViewModels.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
System.Diagnostics.Debug.WriteLinewith properILoggerinfrastructure across 16 files insrc/design/onErrorcallbacks for Rx subscriptions andThrownExceptionssubscriptions on reactive commandsApproach
Three patterns used depending on context:
ExplorerHelper,ImageCacheService)ILoggerresolved fromApp.ServicesILogger<T>resolved in constructor viaApp.Services.GetRequiredService<ILoggerFactory>()DeployFlowViewModel)ILogger<T>via constructor injection from DIFiles changed
ExplorerHelper.cs— 3 calls converted (lazy static logger)CreateProjectStep3View.axaml.cs— 1 callShellViewModel.cs— 2 calls (PrototypeSettings + ShellViewModel)ManageProjectView.axaml.cs— 1 callFundsView.axaml.cs— 1 callShareModal.axaml.cs— 4 callsProjectInfoJsonModal.axaml.cs— 1 callManageProjectModalsView.axaml.cs— 4 calls (also cleaned duplicate usings)SettingsView.axaml.cs— 1 callReceiveFundsModal.axaml.cs— 1 callWalletDetailModal.axaml.cs— 1 callDeployFlowViewModel.cs— 4 calls (DI-injected logger)ImageCacheService.cs— 5 calls (previously converted)MyProjectsViewModel.cs,SettingsViewModel.cs,InvestPageViewModel.cs— error handling improvementsVerification
dotnet build src/design/App.Desktop/App.Desktop.csproj— 0 errorsgrep -r "Debug.WriteLine" src/design/— 0 results