From cda8c4d6cfcc7609f842a1ed4463ebe95fd2e140 Mon Sep 17 00:00:00 2001 From: Chris Yeoh Date: Fri, 1 Aug 2014 16:14:05 +0930 Subject: [PATCH] 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 --- glanceclient/common/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glanceclient/common/http.py b/glanceclient/common/http.py index ad8e4c79..fec3c1cb 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)