-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Standardise link repr in logs #11083
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
base: main
Are you sure you want to change the base?
Conversation
@@ -170,7 +165,7 @@ def __call__( | |||
logger.critical( | |||
"HTTP error %s while getting %s", | |||
e.response.status_code, | |||
link, | |||
link.show_url, |
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.
This should not be show_url but the entire URL.
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.
So its still inconsistent link repr in logs - as described in the issue
url = str(link) | ||
if logger.getEffectiveLevel() > logging.DEBUG: | ||
url = link.show_url | ||
meth("Could not fetch URL %s: %s - skipping", url, reason) |
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.
I don't think warnings/errors should present partial URLs, since its possible that the user has multiple indexes and needs to know which one the error is related to, without adding additional verbosity.
else: | ||
url = link.url_without_fragment | ||
|
||
url = link.show_url |
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.
This is the only part of the change that I'm somewhat fine with, but I wonder if show_url should also mention the domain. That's something we can address in a follow up though.
Closes #7390
ref: #10276 (comment)