refactor: replace Console.WriteLine with DiagnosticLog service
All checks were successful
CI / Build (Linux) (push) Successful in 21s

Replace 495+ Console.WriteLine debug statements across handlers, dispatching, services, views, and window components with centralized DiagnosticLog service for proper logging infrastructure. Add new DiagnosticLog.cs service with Debug/Error methods to eliminate debug logging pollution in production code.
This commit is contained in:
2026-03-06 22:06:08 -05:00
parent 08e0c4d2b9
commit e55230c441
70 changed files with 814 additions and 638 deletions

View File

@@ -48,18 +48,18 @@ public class Fcitx5InputMethodService : IInputMethodService, IDisposable
if (start >= 0 && end > start)
{
_inputContextPath = output.Substring(start + 1, end - start - 1);
Console.WriteLine($"Fcitx5InputMethodService: Created context at {_inputContextPath}");
DiagnosticLog.Debug("Fcitx5InputMethodService", $"Created context at {_inputContextPath}");
StartMonitoring();
}
}
else
{
Console.WriteLine("Fcitx5InputMethodService: Failed to create input context");
DiagnosticLog.Error("Fcitx5InputMethodService", "Failed to create input context");
}
}
catch (Exception ex)
{
Console.WriteLine($"Fcitx5InputMethodService: Initialization failed - {ex.Message}");
DiagnosticLog.Error("Fcitx5InputMethodService", $"Initialization failed - {ex.Message}");
}
}
@@ -102,7 +102,7 @@ public class Fcitx5InputMethodService : IInputMethodService, IDisposable
}
catch (Exception ex)
{
Console.WriteLine($"Fcitx5InputMethodService: Monitor error - {ex.Message}");
DiagnosticLog.Error("Fcitx5InputMethodService", $"Monitor error - {ex.Message}");
}
});
}