Repository navigation
Conversation
…rrently problematic queries are difficult to debug, this should make it easier.
|
A thought: pyactiveresource has its own logging, perhaps we can take advantage of that instead of creating our own log statements? |
|
@mllemango Thanks, I didn't realize that and will take a look. I suppose the question might be moot if I end up using the pyactiveresource logging, but any thoughts on the <3.7 compatibility question? |
|
Oh yes, sorry, fully support dropping pre 3.7 compatibility |
| def _open(self, *args, **kwargs): | ||
| self.response = None | ||
| try: | ||
| log.debug(f"Request: {args, kwargs}") |
There was a problem hiding this comment.
Hey @samLozier, I think it's better to use different patterns when you do log messages:
log.debug("Request: %s, %s", args, kwargs).
Here is an article on that: https://google.github.io/styleguide/pyguide.html#3101-logging
| request = urllib.request.Request(url, urllib.parse.urlencode(query_params).encode("utf-8")) | ||
| log.debug(f"Request URL: {url}, query params: {query_params}") | ||
| response = urllib.request.urlopen(request) | ||
| logging.debug(f"Response: {response}") |
There was a problem hiding this comment.
I think you want to use log.debug(...) here instead.
|
Thanks for contributing! This package is deprecated and we're archiving this repo, so we're closing all open issues and PRs. Please use shopify-app-python instead, and open new issues there. More context: Rethinking support for PHP/Python packages |
Currently, problematic queries are difficult to debug, this should make slightly it easier.
WHY are these changes introduced?
PR is opened to address this discussion: #500
Fixes #500
Context about the problem that’s being addressed:
Adds some very rudimentary debug level logging in the session and base files.
Further discussion:
Checklist