New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General Settings GUI: Disable log level drop-down when log level is disabled or forced (#10209) #10258
General Settings GUI: Disable log level drop-down when log level is disabled or forced (#10209) #10258
Conversation
…isabled or forced (nvaccess#10209)
@@ -317,6 +317,12 @@ def initialize(shouldDoRemoteLogging=False): | |||
except (IOError, WindowsError): | |||
pass # Probably log does not exist, don't care. | |||
logHandler = FileHandler(globalVars.appArgs.logFileName, mode="w",encoding="utf-8") | |||
logLevel = globalVars.appArgs.logLevel | |||
if globalVars.appArgs.debugLogging: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't there be a clause here that checks globalVars.appArgs.noLogging
and sets the level to log.OFF
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, globalVars.appArgs.noLogging
does not apply in the else
clause we are in.
As a reminder:
--debug-logging
takes precedence over--secure
,--log-level
and--no-logging
--log-level
takes precedence over--secure
and--no-logging
I am not sure about the motivations behind the historical decision of not making --debug-logging
, --log-level
and --no-logging
mutually exclusive, though.
Co-Authored-By: Leonard de Ruijter <leonardder@users.noreply.github.com>
Review action nvaccess#10258 (comment) Review action nvaccess#10258 (comment)
Link to issue number:
Fixes #10209
Summary of the issue:
When logging is disabled - either because of secure mode or command line parameters - or when the log level is forced from the command line, the log level drop-down in the General Settings panel can still be operated.
It even shows "info" as the currently selected level while in secure mode.
In these conditions, the apparently possible change only impacts configuration: It does not effectively change the current log level of the running instance of NVDA.
As stated in #10209 (comment) @Qchristensen had contact from one IT administrator trying to setup NVDA securely on their system, concerned that although they have disabled logging, this drop-down can be changed, which gives the appearance that the log level can be changed.
Description of how this pull request fixes the issue:
Testing performed:
Ran a source copy with
--no-logging
/--debug-logging
/--log-level
/--secure
/ no parameter and checked the state and value of the drop-down.Known issues with pull request:
Change log entry:
Section: Changes
The settings dialog no longer allows for changing the configured log level if it has been overridden from the command line.
Section: Bug fixes
The settings dialog no longer shows "info" as the current log level when in secure mode.