nvda
4f411cea - Gate most debug logging calls in the magnifier behind config.conf['debugLog']['magnifier'] (#20354)

Commit
31 days ago
Gate most debug logging calls in the magnifier behind config.conf['debugLog']['magnifier'] (#20354) Closes #20282 Summary of the issue: The new Magnifier feature produces far too much debug output. While this output may be useful when working on the magnifier specifically, it negatively impacts NVDA performance and makes debug logs unusably cluttered in general. Description of user facing changes: New "magnifier" category in the "Enabled logging categories" section of advanced settings. Description of developer facing changes: For add-on devs, none. For development of the magnifier, there is a new _magnifier.config._isDebug function which should be used to decide whether to perform most debug logging. Description of development approach: Added a new magnifier key to the debugLog config section, and added it to the settings GUI. Added a simple function, _magnifier.config._isDebug, which simply returns the value of this key. Searched for "log" in source/magnifier/ and used personal judgment as to whether debug logging calls were generally useful or were internal details that are not broadly of interest. For those that I decided are of specific interest only, gated them behind a call to _isDebug() returning False.
Author
Parents
Loading