Standardize log translation

Remove translation for log.debug and add
missed translation for log.info

Change-Id: I9eec7314d7204738e47f71e3b25991c8f942a04f
This commit is contained in:
Jeremy Liu 2016-10-25 21:29:59 +08:00
parent 122ffce96c
commit 2a5aa0d8a2
5 changed files with 13 additions and 13 deletions

View File

@ -68,24 +68,24 @@ def truncate_desired(cluster, desired, min_size, max_size):
if min_size is not None and desired < min_size:
desired = min_size
LOG.debug(_("Truncating shrinkage to specified min_size (%s).")
% desired)
LOG.debug("Truncating shrinkage to specified min_size (%s).",
desired)
if min_size is None and desired < cluster.min_size:
desired = cluster.min_size
LOG.debug(_("Truncating shrinkage to cluster's min_size (%s).")
% desired)
LOG.debug("Truncating shrinkage to cluster's min_size (%s).",
desired)
if max_size is not None and max_size > 0 and desired > max_size:
desired = max_size
LOG.debug(_("Truncating growth to specified max_size (%s).")
% desired)
LOG.debug("Truncating growth to specified max_size (%s).",
desired)
if (max_size is None and desired > cluster.max_size and
cluster.max_size > 0):
desired = cluster.max_size
LOG.debug(_("Truncating growth to cluster's max_size (%s).")
% desired)
LOG.debug("Truncating growth to cluster's max_size (%s).",
desired)
return desired

View File

@ -69,7 +69,7 @@ class LoadBalancerDriver(base.DriverBase):
if lb_ready is True:
return True
LOG.debug(_('Waiting for loadbalancer %(lb)s to become ready'),
LOG.debug('Waiting for loadbalancer %(lb)s to become ready',
{'lb': lb_id})
eventlet.sleep(10)

View File

@ -14,7 +14,7 @@ from oslo_log import log as logging
from oslo_utils import reflection
from oslo_utils import timeutils
from senlin.common.i18n import _, _LC, _LE, _LW, _LI
from senlin.common.i18n import _LC, _LE, _LW, _LI
from senlin.objects import event as eo
LOG = logging.getLogger(__name__)
@ -173,7 +173,7 @@ def debug(context, entity, action, status=None, status_reason=None,
action=action, status=status, status_reason=status_reason,
user=context.user, project=context.project)
event.store(context)
LOG.debug(_('%(name)s [%(id)s] %(action)s - %(status)s: %(reason)s'),
LOG.debug('%(name)s [%(id)s] %(action)s - %(status)s: %(reason)s',
{'name': event.oname,
'id': event.oid and event.oid[:8],
'action': action,

View File

@ -205,7 +205,7 @@ class HealthManager(service.Service):
'enabled': True,
}
LOG.info("Loading cluster %s for health monitoring",
LOG.info(_LI("Loading cluster %s for health monitoring"),
cluster.cluster_id)
entry = self._start_check(entry)

View File

@ -88,7 +88,7 @@ class Node(object):
profile = pb.Profile.load(context, profile_id=self.profile_id,
project_safe=False)
except exc.ResourceNotFound:
LOG.debug(_('Profile not found: %s'), self.profile_id)
LOG.debug('Profile not found: %s', self.profile_id)
self.rt = {'profile': profile}