Skip to content

Clean up config logging#19957

Merged
seanbudd merged 6 commits intomasterfrom
cleanUpConfigLogging
Apr 22, 2026
Merged

Clean up config logging#19957
seanbudd merged 6 commits intomasterfrom
cleanUpConfigLogging

Conversation

@seanbudd
Copy link
Copy Markdown
Member

@seanbudd seanbudd commented Apr 16, 2026

Link to issue number:

None

Summary of the issue:

nvda would log the config at info level when a profile upgrade fails. Config should only ever be logged at debug level

Description of user facing changes:

none

Description of developer facing changes:

safer logging

Description of development approach:

  • Added a new static method _shouldLogConfigAtStartup to encapsulate the logic for determining whether to log configuration details at startup, improving code readability and maintainability.
  • Updated _loadConfig to use the new helper method when logging information when failing to upgrade a profile

Testing strategy:

manual testing

Known issues with pull request:

  • log.debug will never get logged during initialization, meaning there is no easy way to decide whether or not to log config when it fails to load.

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

Comment thread source/config/__init__.py Outdated
Comment thread source/config/__init__.py Outdated
@seanbudd seanbudd added this to the 2026.1 milestone Apr 16, 2026
@seanbudd
Copy link
Copy Markdown
Member Author

Blocking on the more useful #19966 while we decide what the behaviour should be here

@seanbudd seanbudd marked this pull request as ready for review April 21, 2026 01:59
@seanbudd seanbudd requested a review from a team as a code owner April 21, 2026 01:59
@seanbudd seanbudd requested review from SaschaCowley and Copilot and removed request for Copilot April 21, 2026 01:59
@seanbudd seanbudd changed the base branch from beta to master April 21, 2026 02:31
@seanbudd seanbudd removed this from the 2026.1 milestone Apr 21, 2026
@seanbudd seanbudd merged commit 9da9710 into master Apr 22, 2026
43 of 45 checks passed
@seanbudd seanbudd deleted the cleanUpConfigLogging branch April 22, 2026 05:19
@github-actions github-actions Bot added this to the 2026.2 milestone Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants