diff --git a/allgo/__init__.py b/allgo/__init__.py index b881109cb786d0fe81f5df5e1f3c2cc098eab304..67fba8a3d15787806c3affc9bf4b3f9c8c0b503d 100644 --- a/allgo/__init__.py +++ b/allgo/__init__.py @@ -200,8 +200,8 @@ class Client: """ headers = {'Authorization': 'Token token={}'.format(self.token)} url = '{}/api/v1/{}'.format(self.allgo_url, url_end) - logging.debug("querying '{}' with method '{}'".format(url, method)) - logging.debug("and with data = {}".format(kwargs)) + logging.debug("querying '%s' with method '%s'", str(url), str(method)) + logging.debug("and with data = %s", str(kwargs)) actions = { 'post': requests.post, @@ -209,9 +209,9 @@ class Client: } try: resp = actions[method](url, headers=headers, verify=self.verify_tls, **kwargs) - logging.debug("raw API answer : {}".format(resp.content)) + logging.debug("raw API answer : %s", str(resp.content)) if resp.status_code != requests.codes.ok: - logging.debug("req.status_code = {}".format(resp.status_code)) + logging.debug("req.status_code = %s", str(resp.status_code)) raise StatusError(resp.status_code, resp) return resp.json() except ValueError: # pure python3 should use JSONDecodeError