Logging: add an option to turn logging off altogether#8596
Conversation
…off logging functionality. re nvaccess#8516. If NVDA is run with --no-logging, logging facility will be turned off altogether. This is handy for not only testing this feature, but also for those who'd like to add this command-line switch while defining nVDA shortcut on the desktop or add this from Run dialog (Windows+R).
Switch to null logger if no logging flag is turned on via command-line switches. Also, detect log level of 'OFF' and set log level accordingly (to 100).
… for secure mode. Re nvaccess#8516. Describe available logging modes and what they mean. Also, when edscribing secure mode, add the fact that logging is turned off. Lastly, add an entry in command-line switches table for --no-logging switch.
|
Could you please use the closes or fixes keyword for the Link to issue number? In that case, github magic will automatically close the issue when the pr is merged. |
|
Hi, I see – we may need to document this in “contributing” guide. Thanks for the reminder.
|
|
Not quite sure I agree with the premise behind this. Is a log where it is
any less secure than other data in similar places on the users machine??
Its no good plugging a hole in a boat with no bottom.
|
|
Shall the default value set to "Info" (actual behaviour in NVDA Alpha 15781, 2018-08-03; General NVDA Settings window) or to "Disabled" (privacy by default)? Furthermore there are two different nomenclature for the log levels in the User Guide.
I'm a little bit confused. |
|
Hi, this code hasn’t been merged into master (alpha) branch yet because it needs to go through reviews. The two sets of log levels can be explained by the fact that one is user-friendly one for settings whereas the other one is for command-line use. Thanks.
|
|
I looked at the changed files in this PR directly via the GitHub website. After merging there will be five log levels to be set up via the NVDA GUI and six via the command line. It would be nice to know which log level number have the five options which can be set via the GUI. Or as a question: What log level I have to choose in the command line to get the same result like with "Input/Output" via the GUI? |
|
Hi, that’ll be level 12. Thanks for pointing this out, as this isn’t documented (I’ll edit the user guide accordingly).
|
derekriemer
left a comment
There was a problem hiding this comment.
good. a few minor thoughts.
|
Hi, Although I have no comments about nvda.pyw, I'll edit the user guide based on feedback. Thanks. |
Add notes about privacy for I/O and debug logging levels, along with word usage changes.
|
Hi, @feerrenrut, if you don't mind, I'd like to get a second look please. Thanks. |
| # Input: kb(desktop):v | ||
| logFormatter=Formatter("%(levelname)s - %(codepath)s (%(asctime)s.%(msecs)03d):\n%(message)s", "%H:%M:%S") | ||
| if globalVars.appArgs.secure: | ||
| if globalVars.appArgs.secure or globalVars.appArgs.noLogging: |
There was a problem hiding this comment.
I think it should be possible to override this for debugging purposes. Perhaps either -l --log-level or --debug-logging could override this.
|
Happy to take this feature on, since it's already more or less done and gives users / admin more choices. But I think it's a mistake to think that this is a pathway to privacy or security. For admin trying to ensure that they with GDPR or similar requirements when providing a shared system there are much better ways to ensure the system is cleaned between users. For users who don't trust the system they are using, it should be assumed that every key press, everything displayed, and sound made is recorded. One use case that I think provides an actual benefit, is for uses with limited disk space (though I doubt many users with such limited disk space exist). |
Changes made: * log level checks: now a tuple will be checked. * Allow users to override no logging and logging during secure mode via debug logging or predefined logging levels via command line switches. This means no log will be written if secure mode is active and/or no loggin is specified, and if no debug logging nor custom log levels are given.
Clarified: * -l (log level): default is set to info, and added options for I/O and debugwarning. * --debug-warning: add a notice that it can override --no-logging. * --no-logging: add a notice that this can be overwritten with log levels from command line and if debug logging is on.
…ially logging options.
|
The changelog entry for this PR should probably be changed from: New features: It is possible to turn off NVDA's logging features off by setting logging level to "disabled" from General settings panel. (#8516) To: New features: It is possible to turn off NVDA's logging features by setting the logging level to "disabled" from the General settings panel. (#8516) |
|
Hi, thanks for confirming it, I’ll queue it for docs19.1 branch (after 2019.1 beta 1 is released). Thanks.
From: Bill Dengler <notifications@github.com>
Sent: Saturday, January 12, 2019 5:32 PM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Joseph Lee <joseph.lee22590@gmail.com>; Author <author@noreply.github.com>
Subject: Re: [nvaccess/nvda] Logging: add an option to turn logging off altogether (#8596)
The changelog entry for this PR should probably be changed from:
New features: It is possible to turn off NVDA's logging features off by setting logging level to "disabled" from General settings panel. (#8516 <#8516> )
To:
New features: It is possible to turn off NVDA's logging features by setting the logging level to "disabled" from the General settings panel. (#8516 <#8516> )
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#8596 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkH36nTMFN1MxIXHCtaZb91OyXnOIks5vCoyLgaJpZM4Vv0U1> .
|
Link to issue number:
Fixes #8516
Summary of the issue:
Add an option to turn off logging altogether.
Description of how this pull request fixes the issue:
Add a new option in General settings panel to turn off logging. If this option is chosen, only a startup message (along with config path) will be logged, and log level will be set to 100.
Testing performed:
Tested on source code with logging level set to off and other values.
Known issues with pull request:
Even with logging level set to off, startup info messages will be shown up to config path. Ideally this too should not be logged, but for now, it is acceptable.
Change log entry:
New features: It is possible to turn off NVDA's logging features off by setting logging level to "disabled" from General settings panel. (#8516)
Thanks.