-
Notifications
You must be signed in to change notification settings - Fork 49
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
Implement logging and Git Gud Error #308
Conversation
@@ -13,6 +14,7 @@ | |||
from gitgud.skills.user_messages import handle_solution_confirmation | |||
from gitgud.skills.user_messages import show_skill_tree | |||
|
|||
log=logging.getLogger(__name__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be spaces for assignments: log = ...
This is very much not ready for review. I will undraft this PR when it is. |
@sahansk2 Does this actually solve #279? There are two specific things we wanted to log, can you add them? This is simple enough to get us started and hopefully to get into the habit of logging errors using the logger. On another note, do you think we should convert all print statements to use the logger? |
Also, can you merge master so you can get the GitHub Actions |
25cbd2e
to
a3adcc6
Compare
This will solve #279, but it doesn't right now. I wanted to make a draft PR ahead of time so that we could double check on progress as it's developed. The biggest issues that I have right now are basically:
We shouldn't convert everything to logging (see here), but we could definitely convert some print messages to logging (e.g. |
I think for logging, we can take a simple first approach of simply logging things whenever we think it's necessary, so if there's an exception, include a line with |
Unfortunately, not really. It would be a bit of a hassle on our end to always output to two loggers, one I just thought of this, though: what do you think about having a wrapper function, |
I see what you mean. What if when users had errors, we just logged it all to one file and had them send that file to us? I think that could be good for a first iteration. Right now, we're not even sure how errors will be coming up |
That could work, but it might be difficult from a development perspective to sift through it and see the most important errors. Having an |
This thread was speculative in terms of what we think will be useful. It's better to wait until we know how we can make something useful, so I'm closing this. |
Fixes #279