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: I082f925e6923613e1e8cfeb5a0533747087a5e02
This commit is contained in:
parent
4603c2a48d
commit
939fbc4463
@ -47,19 +47,19 @@ class VersionNegotiationFilter(wsgi.Middleware):
|
||||
args = {'method': req.method, 'path': req.path, 'accept': req.accept}
|
||||
LOG.debug(msg % args)
|
||||
|
||||
LOG.debug(_("Using url versioning"))
|
||||
LOG.debug("Using url versioning")
|
||||
# Remove version in url so it doesn't conflict later
|
||||
req_version = self._pop_path_info(req)
|
||||
|
||||
try:
|
||||
version = self._match_version_string(req_version)
|
||||
except ValueError:
|
||||
LOG.debug(_("Unknown version. Returning version choices."))
|
||||
LOG.debug("Unknown version. Returning version choices.")
|
||||
return self.versions_app
|
||||
|
||||
req.environ['api.version'] = version
|
||||
req.path_info = ''.join(('/v', str(version), req.path_info))
|
||||
LOG.debug(_("Matched version: v%d"), version)
|
||||
LOG.debug("Matched version: v%d", version)
|
||||
LOG.debug('new path %s' % req.path_info)
|
||||
return None
|
||||
|
||||
|
@ -35,7 +35,7 @@ class Controller(object):
|
||||
|
||||
@request_statistics.stats_count(API_NAME, 'Index')
|
||||
def index(self, request):
|
||||
LOG.debug(_('Environments:List'))
|
||||
LOG.debug('Environments:List')
|
||||
|
||||
#Only environments from same tenant as user should be returned
|
||||
filters = {'tenant_id': request.context.tenant}
|
||||
@ -46,7 +46,7 @@ class Controller(object):
|
||||
|
||||
@request_statistics.stats_count(API_NAME, 'Create')
|
||||
def create(self, request, body):
|
||||
LOG.debug(_('Environments:Create <Body {0}>').format(body))
|
||||
LOG.debug('Environments:Create <Body {0}>'.format(body))
|
||||
|
||||
environment = envs.EnvironmentServices.create(body.copy(),
|
||||
request.context.tenant)
|
||||
@ -55,7 +55,7 @@ class Controller(object):
|
||||
|
||||
@request_statistics.stats_count(API_NAME, 'Show')
|
||||
def show(self, request, environment_id):
|
||||
LOG.debug(_('Environments:Show <Id: {0}>').format(environment_id))
|
||||
LOG.debug('Environments:Show <Id: {0}>'.format(environment_id))
|
||||
|
||||
session = db_session.get_session()
|
||||
environment = session.query(models.Environment).get(environment_id)
|
||||
@ -85,8 +85,8 @@ class Controller(object):
|
||||
|
||||
@request_statistics.stats_count(API_NAME, 'Update')
|
||||
def update(self, request, environment_id, body):
|
||||
LOG.debug(_('Environments:Update <Id: {0}, '
|
||||
'Body: {1}>').format(environment_id, body))
|
||||
LOG.debug('Environments:Update <Id: {0}, '
|
||||
'Body: {1}>'.format(environment_id, body))
|
||||
|
||||
session = db_session.get_session()
|
||||
environment = session.query(models.Environment).get(environment_id)
|
||||
@ -108,7 +108,7 @@ class Controller(object):
|
||||
|
||||
@request_statistics.stats_count(API_NAME, 'Delete')
|
||||
def delete(self, request, environment_id):
|
||||
LOG.debug(_('Environments:Delete <Id: {0}>').format(environment_id))
|
||||
LOG.debug('Environments:Delete <Id: {0}>'.format(environment_id))
|
||||
|
||||
unit = db_session.get_session()
|
||||
environment = unit.query(models.Environment).get(environment_id)
|
||||
|
@ -27,7 +27,7 @@ API_NAME = 'EnvironmentStatistics'
|
||||
class Controller(object):
|
||||
@request_statistics.stats_count(API_NAME, 'GetAggregated')
|
||||
def get_aggregated(self, request, environment_id):
|
||||
LOG.debug(_('EnvironmentStatistics:GetAggregated'))
|
||||
LOG.debug('EnvironmentStatistics:GetAggregated')
|
||||
|
||||
# TODO (stanlagun): Check that caller is authorized to access
|
||||
# tenant's statistics
|
||||
@ -37,7 +37,7 @@ class Controller(object):
|
||||
|
||||
@request_statistics.stats_count(API_NAME, 'GetForInstance')
|
||||
def get_for_instance(self, request, environment_id, instance_id):
|
||||
LOG.debug(_('EnvironmentStatistics:GetForInstance'))
|
||||
LOG.debug('EnvironmentStatistics:GetForInstance')
|
||||
|
||||
# TODO (stanlagun): Check that caller is authorized to access
|
||||
# tenant's statistics
|
||||
@ -47,7 +47,7 @@ class Controller(object):
|
||||
|
||||
@request_statistics.stats_count(API_NAME, 'GetForEnvironment')
|
||||
def get_for_environment(self, request, environment_id):
|
||||
LOG.debug(_('EnvironmentStatistics:GetForEnvironment'))
|
||||
LOG.debug('EnvironmentStatistics:GetForEnvironment')
|
||||
|
||||
# TODO (stanlagun): Check that caller is authorized to access
|
||||
# tenant's statistics
|
||||
|
@ -48,8 +48,8 @@ class Controller(object):
|
||||
@utils.verify_env
|
||||
@normalize_path
|
||||
def get(self, request, environment_id, path):
|
||||
LOG.debug(_('Services:Get <EnvId: {0}, '
|
||||
'Path: {1}>').format(environment_id, path))
|
||||
LOG.debug('Services:Get <EnvId: {0}, '
|
||||
'Path: {1}>'.format(environment_id, path))
|
||||
|
||||
session_id = None
|
||||
if hasattr(request, 'context') and request.context.session:
|
||||
@ -69,8 +69,8 @@ class Controller(object):
|
||||
@normalize_path
|
||||
def post(self, request, environment_id, path, body):
|
||||
secure_data = token_sanitizer.TokenSanitizer().sanitize(body)
|
||||
LOG.debug(_('Services:Post <EnvId: {0}, Path: {2}, '
|
||||
'Body: {1}>').format(environment_id, secure_data, path))
|
||||
LOG.debug('Services:Post <EnvId: {0}, Path: {2}, '
|
||||
'Body: {1}>'.format(environment_id, secure_data, path))
|
||||
|
||||
post_data = core_services.CoreServices.post_data
|
||||
session_id = request.context.session
|
||||
@ -85,8 +85,8 @@ class Controller(object):
|
||||
@utils.verify_env
|
||||
@normalize_path
|
||||
def put(self, request, environment_id, path, body):
|
||||
LOG.debug(_('Services:Put <EnvId: {0}, Path: {2}, '
|
||||
'Body: {1}>').format(environment_id, body, path))
|
||||
LOG.debug('Services:Put <EnvId: {0}, Path: {2}, '
|
||||
'Body: {1}>'.format(environment_id, body, path))
|
||||
|
||||
put_data = core_services.CoreServices.put_data
|
||||
session_id = request.context.session
|
||||
@ -102,8 +102,8 @@ class Controller(object):
|
||||
@utils.verify_env
|
||||
@normalize_path
|
||||
def delete(self, request, environment_id, path):
|
||||
LOG.debug(_('Services:Put <EnvId: {0}, '
|
||||
'Path: {1}>').format(environment_id, path))
|
||||
LOG.debug('Services:Put <EnvId: {0}, '
|
||||
'Path: {1}>'.format(environment_id, path))
|
||||
|
||||
delete_data = core_services.CoreServices.delete_data
|
||||
session_id = request.context.session
|
||||
|
@ -32,7 +32,7 @@ API_NAME = 'Sessions'
|
||||
class Controller(object):
|
||||
@request_statistics.stats_count(API_NAME, 'Create')
|
||||
def configure(self, request, environment_id):
|
||||
LOG.debug(_('Session:Configure <EnvId: {0}>').format(environment_id))
|
||||
LOG.debug('Session:Configure <EnvId: {0}>'.format(environment_id))
|
||||
|
||||
unit = db_session.get_session()
|
||||
environment = unit.query(models.Environment).get(environment_id)
|
||||
@ -62,7 +62,7 @@ class Controller(object):
|
||||
|
||||
@request_statistics.stats_count(API_NAME, 'Index')
|
||||
def show(self, request, environment_id, session_id):
|
||||
LOG.debug(_('Session:Show <SessionId: {0}>').format(session_id))
|
||||
LOG.debug('Session:Show <SessionId: {0}>'.format(session_id))
|
||||
|
||||
unit = db_session.get_session()
|
||||
session = unit.query(models.Session).get(session_id)
|
||||
@ -92,7 +92,7 @@ class Controller(object):
|
||||
|
||||
@request_statistics.stats_count(API_NAME, 'Delete')
|
||||
def delete(self, request, environment_id, session_id):
|
||||
LOG.debug(_('Session:Delete <SessionId: {0}>').format(session_id))
|
||||
LOG.debug('Session:Delete <SessionId: {0}>'.format(session_id))
|
||||
|
||||
unit = db_session.get_session()
|
||||
session = unit.query(models.Session).get(session_id)
|
||||
@ -125,7 +125,7 @@ class Controller(object):
|
||||
|
||||
@request_statistics.stats_count(API_NAME, 'Deploy')
|
||||
def deploy(self, request, environment_id, session_id):
|
||||
LOG.debug(_('Session:Deploy <SessionId: {0}>').format(session_id))
|
||||
LOG.debug('Session:Deploy <SessionId: {0}>'.format(session_id))
|
||||
|
||||
unit = db_session.get_session()
|
||||
session = unit.query(models.Session).get(session_id)
|
||||
|
@ -40,14 +40,14 @@ class ResultEndpoint(object):
|
||||
@staticmethod
|
||||
def process_result(context, result):
|
||||
secure_result = token_sanitizer.TokenSanitizer().sanitize(result)
|
||||
LOG.debug(_('Got result from orchestration '
|
||||
'engine:\n{0}').format(secure_result))
|
||||
LOG.debug('Got result from orchestration '
|
||||
'engine:\n{0}'.format(secure_result))
|
||||
|
||||
result_id = result['Objects']['?']['id']
|
||||
|
||||
if 'deleted' in result:
|
||||
LOG.debug(_('Result for environment {0} is dropped. Environment '
|
||||
'is deleted').format(result_id))
|
||||
LOG.debug('Result for environment {0} is dropped. Environment '
|
||||
'is deleted'.format(result_id))
|
||||
return
|
||||
|
||||
unit = session.get_session()
|
||||
@ -115,8 +115,8 @@ def notification_endpoint_wrapper(priority='info'):
|
||||
|
||||
@notification_endpoint_wrapper()
|
||||
def track_instance(payload):
|
||||
LOG.debug(_('Got track instance request from orchestration '
|
||||
'engine:\n{0}').format(payload))
|
||||
LOG.debug('Got track instance request from orchestration '
|
||||
'engine:\n{0}'.format(payload))
|
||||
instance_id = payload['instance']
|
||||
instance_type = payload.get('instance_type', 0)
|
||||
environment_id = payload['environment']
|
||||
@ -131,8 +131,8 @@ def track_instance(payload):
|
||||
|
||||
@notification_endpoint_wrapper()
|
||||
def untrack_instance(payload):
|
||||
LOG.debug(_('Got untrack instance request from orchestration '
|
||||
'engine:\n{0}').format(payload))
|
||||
LOG.debug('Got untrack instance request from orchestration '
|
||||
'engine:\n{0}'.format(payload))
|
||||
instance_id = payload['instance']
|
||||
environment_id = payload['environment']
|
||||
instances.InstanceStatsServices.destroy_instance(
|
||||
@ -141,8 +141,8 @@ def untrack_instance(payload):
|
||||
|
||||
@notification_endpoint_wrapper()
|
||||
def report_notification(report):
|
||||
LOG.debug(_('Got report from orchestration '
|
||||
'engine:\n{0}').format(report))
|
||||
LOG.debug('Got report from orchestration '
|
||||
'engine:\n{0}'.format(report))
|
||||
|
||||
report['entity_id'] = report['id']
|
||||
del report['id']
|
||||
|
@ -54,7 +54,7 @@ class StatsCollectingService(service.Service):
|
||||
eventlet.sleep(period)
|
||||
|
||||
def update_stats(self):
|
||||
LOG.debug(_("Updating statistic information."))
|
||||
LOG.debug("Updating statistic information.")
|
||||
LOG.debug("Stats object: %s" % v1.stats)
|
||||
LOG.debug("Stats: Requests:%s Errors: %s Ave.Res.Time %2.4f\n"
|
||||
"Per tenant: %s" %
|
||||
|
Loading…
Reference in New Issue
Block a user