debug level logs should not be translated

According to the OpenStack translation policy available at
https://wiki.openstack.org/wiki/LoggingStandards debug messages
should not be translated. Like mentioned in several changes in
Nova by garyk this is to help prioritize log translation.

Change-Id: I43c5d4ecd2286f1a622b6822603ba62881a317a2
This commit is contained in:
Christian Berendt 2014-05-12 19:09:50 +02:00
parent 0e61a37e7e
commit 22277e6d0b
2 changed files with 6 additions and 7 deletions

View File

@ -20,7 +20,6 @@ import pkg_resources
import six
from novaclient import exceptions
from novaclient.openstack.common.gettextutils import _
from novaclient import utils
@ -40,7 +39,7 @@ def discover_auth_systems():
try:
auth_plugin = ep.load()
except (ImportError, pkg_resources.UnknownExtra, AttributeError) as e:
logger.debug(_("ERROR: Cannot load auth plugin %s") % ep.name)
logger.debug("ERROR: Cannot load auth plugin %s" % ep.name)
logger.debug(e, exc_info=1)
else:
_discovered_plugins[ep.name] = auth_plugin

View File

@ -183,10 +183,10 @@ class HTTPClient(object):
def http_log_resp(self, resp):
if not self.http_log_debug:
return
self._logger.debug(_("RESP: [%(status)s] %(headers)s\nRESP BODY: "
"%(text)s\n"), {'status': resp.status_code,
'headers': resp.headers,
'text': resp.text})
self._logger.debug("RESP: [%(status)s] %(headers)s\nRESP BODY: "
"%(text)s\n", {'status': resp.status_code,
'headers': resp.headers,
'text': resp.text})
def open_session(self):
if not self._connection_pool:
@ -375,7 +375,7 @@ class HTTPClient(object):
# GET ...:5001/v2.0/tokens/#####/endpoints
url = '/'.join([url, 'tokens', '%s?belongsTo=%s'
% (self.proxy_token, self.proxy_tenant_id)])
self._logger.debug(_("Using Endpoint URL: %s") % url)
self._logger.debug("Using Endpoint URL: %s" % url)
resp, body = self._time_request(
url, "GET", headers={'X-Auth-Token': self.auth_token})
return self._extract_service_catalog(url, resp, body,