From 1a63105d5b179abee48d104454a69a76919f7699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 14 Aug 2018 17:15:41 +0200 Subject: [PATCH] Logging fixes --- benchmark/submission/__init__.py | 4 ++-- benchmark/submission/client.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark/submission/__init__.py b/benchmark/submission/__init__.py index 8ce11f7..ac123eb 100644 --- a/benchmark/submission/__init__.py +++ b/benchmark/submission/__init__.py @@ -34,9 +34,9 @@ def _submit_and_update_g(benchmark_data: dict) -> None: except exceptions.CommunicationError as ex: log.error('Error %d submitting benchmark: %s', ex.status_code, ex.message) if ex.json: - log.error('Response JSON:', ex.json) + log.error('Response JSON: %r', ex.json) else: - log.error('Response body: %s', ex.body) + log.error('Response body: %r', ex.body) set_exception(ex) return diff --git a/benchmark/submission/client.py b/benchmark/submission/client.py index 6191ab6..3423b96 100644 --- a/benchmark/submission/client.py +++ b/benchmark/submission/client.py @@ -164,7 +164,7 @@ class BenchmarkClient: headers={'Authorization': f'Bearer {self.auth_token}'}, timeout=timeouts.submit) if resp.status_code != 201: - log.error('Bad status code %d received: %s', resp.status_code, resp.text) + log.debug('Bad status code %d received: %s', resp.status_code, resp.text) raise exceptions.CommunicationError(f'Bad status code received', resp) result = resp.json()