Develop an error logging framework to hide errors from user unless prompted
- Dominant language
- Python
- Stars
- 558
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
Spawned from #197 .
https://github.com/benthayer/git-gud/issues/197#issuecomment-671157907:
> Hmm...just to make sure, would you like some sort of error handling so that the error is hidden from the user unless they run `git gud error` explicitly (for debug purposes)? Something like [this, maybe?]
> > Oops! Git Gud ran into a problem. Please try your command again. If the problem persists, please run `git gud issues` to open our GitHub, and create an issue with the output of `git gud error` so that we can try to help you!
https://github.com/benthayer/git-gud/issues/197#issuecomment-671614510:
> I don't think we need to `pickle` the error, since the stack trace is only useful as text for us (and so, `pickle` seems overkill). We could always just output to two files, `.git/gud/error.txt` and `.git/gud/logs/hh:mm-DDMMYY.txt` with `error.txt` holding the content of the most recent log. `git gud error` would print out `error.txt`.
>
> I think we should try to make use of the [`logging`](https://docs.python.org/3/library/logging.html) module, since it has [support for writing to files with extra information](https://docs.python.org/3/howto/logging.html#logging-to-a-file).
Contributor guide
Assessment
This issue has not been assessed yet.