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 Log Files should be identifiable both by version that created them and, for portable or "running from installer" versus installed #15555

Open
britechguy opened this issue Sep 30, 2023 · 11 comments
Labels
audience/nvda-dev PR or issue is relevant to NVDA / Add-on developers p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.

Comments

@britechguy
Copy link

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

At the moment, NVDA, whether portable, running from installer, or running as installed all use %TEMP% as the location for both nvda.log, and nvda-old.log.

When attempting to diagnose issues using older versions of NVDA, run as portable or from installer, as well as running whatever the latest installed version happens to be, this results in each one respectively "clobbering" the nvda.log of the other and, potentially, even the nvda-old.log.

Describe the solution you'd like

I would like to see the generic nvda.log, and nvda-old.log, additionally identified with the version of NVDA that created them, as well as "how they were run" if the latter is practical, and I have to believe it would be.

I would far sooner see nvda2023.beta3_installed.log or nvda_2023.1_portable.log or nvda2023.2_installer.log, and the same thing for their respective -old equivalents. It makes it immediately clear what version of NVDA generated the log as well as how that particular run of NVDA was performed.

Describe alternatives you've considered

None

Additional context

N/A

@YetiAnt
Copy link

YetiAnt commented Oct 1, 2023

I often use NVDA to examine software accessibility. The date and time of the creation of a log would also be very helpful.
So I would like the name nvda2023.beta3 installed.log 20231001 0524; where the numbers at the end represent the timestamp of the start of the instance. .
Of course, it would still have to be ensured that endless log files do not accumulate. a bot could delete all logs older than ?24 hours? when starting NVDA.

@britechguy
Copy link
Author

I certainly wouldn't object to date-time being added to the name of the log file.

@AbhishekSRaut
Copy link

@britechguy,
I respectfully hold a differing perspective on this matter. Whether NVDA is executed as a portable or installable application, the fundamental system behavior remains unchanged. Log files are consistently saved in the %TEMP% directory. In this setup, when NVDA is restarted, the previous logs become "nvda-old.log," and the newly generated ones are "nvda.log."
It's crucial to recognize that developers primarily focus on the log content rather than file names. The log entries already include version numbers and relevant information. In essence, there are only two files to manage, and the distinction is relatively straightforward.
The decision to name log files differently can be left to individual users. For instance, if you are running NVDA 2023.3 beta and believe that separate logs are necessary, you can manually copy and rename these files as you see fit.
Regarding the installable and portable versions, there is virtually no distinction other than the configuration directory, which is already documented within the log files.
In summary, while I understand the desire for more elaborate log file names, the existing system is generally practical, with log content being the primary concern for developers. However, flexibility in naming can be left to user discretion.

@YetiAnt
Copy link

YetiAnt commented Oct 1, 2023

Desires are one thing, feature requests are another.
I'm sorry that I didn't give sufficient consideration to the issue of security :-(

@beqabeqa473
Copy link
Contributor

beqabeqa473 commented Oct 1, 2023 via email

@Brian1Gaff
Copy link

Brian1Gaff commented Oct 1, 2023 via email

@britechguy
Copy link
Author

I'm sure the security in windows would complain bitterly if the info in the user config of a portable version was going to ask to be saved in app data folders.

And, yet, they are. We just went through this, at length, yesterday on the NVDA group, which is part of what triggered my request. See topic: 2 bugs found in latest Beta 3

If you want to argue with Rui Fontes, myself, Sarah Alawami, & Luke Davis about where we find our nvda.log and nvda-old.log files stored, no matter what NVDA "run type" we're using, have at it.

@beqabeqa473: I have no idea what you're talking about with logs being scattered. I proposed log file names that give a clear indication of their exact genesis. I did not propose having them in any folder location other than %TEMP%

@AbhishekSRaut : You believe that this setup is "generally practical" and I absolutely, positively do not. It requres gyrations on the part of users that should not be necessary, and makes their participating in the debugging process more complicated than it need be.

@CyrilleB79
Copy link
Collaborator

Although not exactly answering to this request, NVDA Dev & Test Toolbox add-on allows to save a configurable number of logs timestamped with date/time.

Of course the add-on does not replace a built-in feature; and in case of assistance, it's interesting to have the feature directly built in NVDA. But the add-on can be a source of inspiration.

If more than two logs (nvda.log and nvda-old.log) are saved in %temp%, we should ensure that an assisted user will be able to find and send the appropriate log. Giving instructions such as "Send us nvda-old.log and nvda.log" are clearer and more universal; but in the case of various versions of NVDA (portable, installed, etc.) I acknowledge that it can lead to confusion.

@Brian1Gaff
Copy link

Brian1Gaff commented Oct 2, 2023 via email

@britechguy
Copy link
Author

@Brian1Gaff

While I understand your script, even is not necessary, strictly speaking, in many instances. If it's only 2 successive invocations of NVDA, the latest one would be logged in nvda.log, and the immediately prior invocation would still be available in nvda-old.log.

This entire feature request has arisen out of what one has to do in order to adequately test issue #15554, which arose out of work I was doing for issue #15397. In the situation that was going on, there was no way to adequately test this without invoking the NVDA installer instance without using a command line and LOGFILE switch. I doubt that this has been, or will be, the sole instance where this is the case. Hence, this feature request.

@seanbudd
Copy link
Member

seanbudd commented Oct 2, 2023

See also #12621

@seanbudd seanbudd added p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority audience/nvda-dev PR or issue is relevant to NVDA / Add-on developers triaged Has been triaged, issue is waiting for implementation. labels Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audience/nvda-dev PR or issue is relevant to NVDA / Add-on developers p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

No branches or pull requests

7 participants