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

Option to enable debug logs #206

Merged
merged 3 commits into from
Dec 27, 2023
Merged

Option to enable debug logs #206

merged 3 commits into from
Dec 27, 2023

Conversation

gosuwachu
Copy link
Contributor

I find logs very useful. So far I had to keep applying this patch on top of my changes. It would be useful to add this option to the cli to help with debugging. I hope the logs will improve in the future to include more interesting info abouy the operation of the program.

piotrwach and others added 3 commits December 27, 2023 00:04
…ncludes panics.

Previously, when `dua i` was used, panics would be hard to observe, if at all,
as they would print to the alternate screen. Now, when the `--log-file dua.log`
is specified, the panic will be emitted into the log file instead and thus won't
be lost anymore.

This may help with debugging in future.
Copy link
Owner

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, a great idea!

The bare-bones feature didn't seem too useful, but it turns out there is a wonderful log-panics crate which works as advertised. Seeing panics properly fixes a serious issue I had in the rare occasion that dua i did crash on me - now the panic will just be written into the log file, with backtrace even.

@Byron Byron merged commit 196f0d6 into Byron:main Dec 27, 2023
2 checks passed
@gosuwachu gosuwachu deleted the logging branch December 27, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants