General Settings GUI: Disable log level drop-down when log level is disabled or forced (#10209)#10258
Merged
michaelDCurran merged 4 commits intoSep 23, 2019
Conversation
…isabled or forced (nvaccess#10209)
LeonarddeR
reviewed
Sep 21, 2019
| 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: |
Collaborator
There was a problem hiding this comment.
Shouldn't there be a clause here that checks globalVars.appArgs.noLogging and sets the level to log.OFF?
Contributor
Author
There was a problem hiding this comment.
Nope, globalVars.appArgs.noLogging does not apply in the else clause we are in.
As a reminder:
--debug-loggingtakes precedence over--secure,--log-leveland--no-logging--log-leveltakes precedence over--secureand--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>
michaelDCurran
requested changes
Sep 23, 2019
Review action nvaccess#10258 (comment) Review action nvaccess#10258 (comment)
michaelDCurran
approved these changes
Sep 23, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.