-
Notifications
You must be signed in to change notification settings - Fork 4
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
Change logging exception to logging error, at least for HTTPErrors #835
Conversation
…ot sure about the other change, I'll ask Dave
…tead of exception.
…tead of exception.
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.
Looks good. Consider using the first trace entry as per comment. Also consider if this even needs to be logged? Not sure how much extra processing grabbing the trace is.
…es-for-common-httperrors-400-ish-and-500-ish-status-codes-and-bad-certificates
…he way down the stack) and adding test_logging.py management command.
…ces all the time.
Hi @datadavev I'd talked with Adam about changes for now and he said we should proceed with the first step of reducing Let me know if you see problems with the changes here since I just incorporated them here. I can move to a different PR if you'd like me to, instead. |
I tested the link checker on dev and the logging is significantly reduced. (See the issue for a few notes.) I think I'll deploy to stage and I think we should go ahead with this to production later this week unless there is some real reason not to. |
@sfisher Hi Scott, Changes look good. Please go ahead merge and deploy on prod. Jing |
Hi Dave,
Thanks for your feedback. You can see I've changed IncompleteRead, HTTPError and the exception branch to use
log.error()
instead oflog.exception()
and some use the simple_error() method which just logs the exception name, line number and optionally a status code if it's an HTTPError.Does this seem reasonable to you?
I tested out the simple_error() method manually and it all seems to work ok.
Let me know what you think and I'll maybe try it on dev.