From 2275017651d621c69b32c1bac3f95d779e6bc01e Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 18 Aug 2015 13:34:15 +0800 Subject: [PATCH] influxdb: better error reporting --- artiq/frontend/artiq_influxdb.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/artiq/frontend/artiq_influxdb.py b/artiq/frontend/artiq_influxdb.py index 8c57b595e..f719afc8f 100755 --- a/artiq/frontend/artiq_influxdb.py +++ b/artiq/frontend/artiq_influxdb.py @@ -91,8 +91,12 @@ class DBWriter(TaskObject): k, exc_info=True) else: if response.status not in (200, 204): - logger.warning("got HTTP status %d trying to update '%s'", - response.status, k) + content = (yield from response.content.read()).decode() + if content: + content = content[:-1] # drop \n + logger.warning("got HTTP status %d " + "trying to update '%s': %s", + response.status, k, content) response.close()