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: I022de0d722b55a23cec68eed5216b7113f69624e
This commit is contained in:
Christian Berendt 2014-05-12 12:14:31 +02:00
parent db86f57cf4
commit f1fda67d01
3 changed files with 9 additions and 10 deletions

View File

@ -22,7 +22,6 @@ from werkzeug import exceptions as werkzeug_exceptions
from climate.api.v1.oshosts import v1_0 as host_api_v1_0
from climate.api.v1 import utils as api_utils
from climate.api.v1 import v1_0 as api_v1_0
from climate.openstack.common.gettextutils import _
from climate.openstack.common import log
from climate.openstack.common.middleware import debug
@ -86,8 +85,8 @@ def make_app():
app.error_handler_spec[None][code] = make_json_error
if cfg.CONF.debug and not cfg.CONF.log_exchange:
LOG.debug(_('Logging of request/response exchange could be enabled '
'using flag --log_exchange'))
LOG.debug('Logging of request/response exchange could be enabled '
'using flag --log_exchange')
if cfg.CONF.log_exchange:
app.wsgi_app = debug.Debug.factory(app.config)(app.wsgi_app)

View File

@ -60,7 +60,7 @@ class Rest(flask.Blueprint):
endpoint = options.pop('endpoint', func.__name__)
def handler(**kwargs):
LOG.debug(_("Rest.route.decorator.handler, kwargs=%s"), kwargs)
LOG.debug("Rest.route.decorator.handler, kwargs=%s", kwargs)
_init_resp_type(file_upload)
@ -174,7 +174,7 @@ def request_data():
return flask.request.parsed_data
if not flask.request.content_length > 0:
LOG.debug(_("Empty body provided in request"))
LOG.debug("Empty body provided in request")
return dict()
if flask.request.file_upload:
@ -245,8 +245,8 @@ def bad_request(error):
if not error.code:
error.code = 400
LOG.debug(_("Validation Error occurred: error_code=%(code)s, "
"error_message=%(msg)s, error_name=%(name)s"),
LOG.debug("Validation Error occurred: error_code=%(code)s, "
"error_message=%(msg)s, error_name=%(name)s",
{'code': error.code, 'msg': error.message, 'name': error.code})
return render_error_message(error.code, error.message, error.code)
@ -257,8 +257,8 @@ def not_found(error):
if not error.code:
error.code = 404
LOG.debug(_("Not Found exception occurred: error_code=%(code)s, "
"error_message=%(msg)s, error_name=%(name)s"),
LOG.debug("Not Found exception occurred: error_code=%(code)s, "
"error_message=%(msg)s, error_name=%(name)s",
{'code': error.code, 'msg': error.message, 'name': error.code})
return render_error_message(error.code, error.message, error.code)

View File

@ -124,7 +124,7 @@ class ManagerService(service_utils.RPCServer):
If there is an event in Climate DB to be done, do it and change its
status to 'DONE'.
"""
LOG.debug(_('Trying to get event from DB.'))
LOG.debug('Trying to get event from DB.')
event = db_api.event_get_first_sorted_by_filters(
sort_key='time',
sort_dir='asc',