Don't translate debug level logs in cloudpipe, hacking, ipv6, keymgr

Our translation policy
(https://wiki.openstack.org/wiki/LoggingStandards#Log_Translation) calls
for not translating debug level logs. This is to help prioritize log
translation. Furthermore translation has a performance overhead, even if
the log isn't used (since nova doesn't support lazy translation yet).

Change-Id: Icdae100d5a506fdaa56fd124dc9860cdfddbe288
This commit is contained in:
Gary Kotton
2014-04-29 03:42:34 -07:00
committed by garyk
parent 0c25fbbac8
commit eac509dcf0
2 changed files with 6 additions and 1 deletions

View File

@@ -122,7 +122,7 @@ class CloudPipe(object):
return encoded
def launch_vpn_instance(self, context):
LOG.debug(_("Launching VPN for %s") % (context.project_id))
LOG.debug("Launching VPN for %s", context.project_id)
key_name = self.setup_key_pair(context)
group_name = self.setup_security_group(context)
flavor = flavors.get_flavor_by_name(CONF.vpn_flavor)

View File

@@ -219,6 +219,11 @@ def no_translate_debug_logs(logical_line, filename):
"nova/cert",
"nova/console",
"nova/consoleauth",
"nova/cloudpipe",
"nova/image",
"nova/hacking",
"nova/ipv6",
"nova/keymgr",
]
if max([name in filename for name in dirs]):
if logical_line.startswith("LOG.debug(_("):