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

Send logs to Windows Event Viewer #34

Open
parasyte opened this issue Dec 10, 2022 · 0 comments
Open

Send logs to Windows Event Viewer #34

parasyte opened this issue Dec 10, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@parasyte
Copy link
Owner

I got a report on Reddit that said the app would not work, and it led to a discussion involving how to troubleshoot the issue. One of the challenges with the Windows build is that all standard output is disabled so the app doesn't require a separate console window. This improves UX in the general case (i.e., when things work) but is really bad for troubleshooting because error messages are not visible anywhere.

One thing I have done in another project for error reporting on Windows is using the msgbox crate to open a simple message box window when there are any fatal errors. The UX is ok-ish; you are given some info about the problem, but the only thing you can do with it is take a screenshot. If the error is long enough, it may not fit on the screen at all! There is no scroll bar and no way to copy the text.

I propose that fatal errors should use msgbox to bring attention to the problem in a minimalistic way. Instead of printing the entire error message in the message box, it should provide a short description of the error and instruct the user to look in the Windows Event Viewer (if the platform is Windows) for any additional context. The win_etw_logger crate provides a Log implementation just for this purpose! It can spew everything with level WARN and above to the Event Tracing for Windows thingie.

That should provide a pretty good UX when things go bad (how good can it be, honestly, when the app won't even start?) At least it will be a marked improvement.

@parasyte parasyte added enhancement New feature or request good first issue Good for newcomers labels Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant