summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Yeoh <cyeoh@au1.ibm.com>2014-08-01 16:14:05 +0930
committerChris Yeoh <cyeoh@au1.ibm.com>2014-08-01 16:15:15 +0930
commitcda8c4d6cfcc7609f842a1ed4463ebe95fd2e140 (patch)
tree322e2047234e5c07dc6e0f0377014b43c8dfa244
parent68c1d1fbc614d11b95f2fd6da26fd669e40f4186 (diff)
downloadpython-glanceclient-cda8c4d6cfcc7609f842a1ed4463ebe95fd2e140.tar.gz
Downgrade log message for http request failures
Downgrades the log message when an http request fails from error to debug. The logging level changed in the http.py upgrade in I09f70eee3e2777f52ce040296015d41649c2586a which effectively reverted a similar fix commited in I6d0efb53d1e81adf309f7fa580ec5a8073a811c5. We don't want to log at ERROR level because we already have an exception raised and the caller can handle it if wants to. However this error will appear regularly in the Nova logs under normal behavior (say a client specifies an image which does not exist) and there is no way of disabling only the glanceclient error log. This results in a lot of noise in the nova log file. Change-Id: Iec13bff439073a79cb24e9b22fd43603ae4e61b7
-rw-r--r--glanceclient/common/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/glanceclient/common/http.py b/glanceclient/common/http.py
index ad8e4c7..fec3c1c 100644
--- a/glanceclient/common/http.py
+++ b/glanceclient/common/http.py
@@ -195,7 +195,7 @@ class HTTPClient(object):
raise exc.CommunicationError(message=message)
if not resp.ok:
- LOG.error("Request returned failure status %s." % resp.status_code)
+ LOG.debug("Request returned failure status %s." % resp.status_code)
raise exc.from_response(resp, resp.content)
elif resp.status_code == requests.codes.MULTIPLE_CHOICES:
raise exc.from_response(resp)