Skip to content

Add setting to redact username from logs for privacy#4902

Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
autohide-username-settings
Jun 9, 2026
Merged

Add setting to redact username from logs for privacy#4902
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
autohide-username-settings

Conversation

@GabrielDuf

Copy link
Copy Markdown
Contributor

This pull request introduces a new privacy feature that allows users to hide their username from all logs generated by UniGetUI. When enabled, the user's name is replaced with **** in logs, crash reports, update logs, and operation outputs. This is controlled by a new setting, exposed in the UI and persisted in the application's settings. The implementation also refactors logging methods to centralize redaction logic and ensure consistent application across the codebase.

Privacy Feature: Hide Username in Logs

  • Added a new setting RedactUsernameInLog to the settings engine and UI, allowing users to enable or disable username redaction in logs. The UI includes a checkbox with explanatory text in both Avalonia and WPF frontends.
  • Updated the English language resource file with new strings for the privacy section and explanatory text.

Core Logging and Redaction Logic

  • Introduced the Logger.RedactUsername property and a public Logger.Redact(string) method that replaces the current user's name with **** when redaction is enabled. Refactored all logging entry points to use a centralized private Add method that applies redaction.
  • Applied Logger.Redact to crash report generation, update logs, and package operation logs to ensure the username is hidden everywhere when the setting is enabled.

Initialization and Settings Integration

  • Set Logger.RedactUsername at application startup based on the persisted setting value in both Avalonia and WPF entry points.

This change improves user privacy by giving control over personally identifiable information in logs, and ensures the feature is applied consistently throughout the application.

@GabrielDuf Gabriel Dufresne (GabrielDuf) merged commit bb53804 into main Jun 9, 2026
4 checks passed
@GabrielDuf Gabriel Dufresne (GabrielDuf) deleted the autohide-username-settings branch June 9, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants