Skip to content
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

NVDA should log its version number immediately, at all log levels #9803

XLTechie opened this issue Jun 24, 2019 · 4 comments · Fixed by #10004

NVDA should log its version number immediately, at all log levels #9803

XLTechie opened this issue Jun 24, 2019 · 4 comments · Fixed by #10004


Copy link

@XLTechie XLTechie commented Jun 24, 2019

Note: edited to reflect that NVDA does log version, just not soon enough IMO.

Is your feature request related to a problem? Please describe.

Not a specific one, but to help debugging problems in general, and when doing software testing, I would like to see NVDA's version number in the log, as soon as possible. I think it should be included at the lowest level of logging where something is logged, which I believe is currently the "disabled" level.

Describe the solution you'd like

The log currently provides this as its first entry:

INFO - main (05:29:56.973):
Starting NVDA

I would like to see this replaced with something like:

INFO - main (05:29:56.973):
Starting NVDA, version alpha-17780,40bef374

Describe alternatives you've considered

There aren't any that I know of. I am used to working with Unix systems, where most everything that generates a log meant for debugging, includes the program's version unconditionally.

Additional context

When attempting to debug NVDA issues, it is sometimes useful to run several versions of NVDA sequentially. (edit) If NVDA is not set to at least info level logging in its saved config, or started with the necessary CLI option, and is only later set to a more detailed log level, the version is never logged.
(If started with a log level such as "warning" (--log-level=30), the version is not logged either, but neither is much else. Odd, since the "disabled" log level logs more, but I digress).

I had a case recently, where a failure mode was causing NVDA not to produce any log file under a particular circumstance. It thus became difficult to determine which of the files I was looking at, had been generated by which version of NVDA: the current one that just ran, or the one that ran before that because this one didn't clean up that one's log into nvda-old, etc.
Since these were different versions of NVDA, if the first or second log entry had included the NVDA version number, as most software does, this situation would have been a non-issue.

Copy link

@lukaszgo1 lukaszgo1 commented Jun 24, 2019

The required information is already present in the log. In my case it's the 10th line from the top as follows:

NVDA version alpha-17780,40bef374

Copy link

@Brian1Gaff Brian1Gaff commented Jun 24, 2019

Copy link
Contributor Author

@XLTechie XLTechie commented Jun 24, 2019

I see.

Yes, it is there, but I still maintain that:

  1. It should appear almost immediately--before NVDA tries to load configurations, or starts logging other things.
    • In theory, although I don't know enough about the logging system to be sure, something could go wrong in the config loading or other processes, and the info call that logs the version might never be generated. Don't know how realistic that is.
  2. That version is only logged, if your saved configuration includes info level logging or higher. If you initiate debugging or other logging after startup from a logging "disabled" state, you never get the info message about the version, which was why I never saw it in my other runs.
    • See the attached log from 2019.1.1 for an example of this.

So unless I am wrong again about some part of this, I revise my request to having the version logged immediately, and at every level, including "disabled" (which still does log the startup).

@XLTechie XLTechie changed the title NVDA should include its own version number in logs NVDA should log its version number immediately, at all log levels Jun 24, 2019
Copy link

@josephsl josephsl commented Jun 24, 2019

lukaszgo1 added a commit to lukaszgo1/nvda that referenced this issue Jul 31, 2019
michaelDCurran pushed a commit that referenced this issue Sep 16, 2019
…easier (#10004)

* Log NVDA version number at the top of the log file to make debugging easier. Closes #9803

* Set encoding to UTF-8

* Some fixes for linter

* Second fix for linter

* Standardize copyright header

* Attempt at moving import around to make linter happy
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging a pull request may close this issue.

5 participants