From 52035468bb6e721e16ca41c85bbb359f9efb6b40 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 7 Mar 2013 11:12:20 +0000 Subject: [PATCH] heat common : policy.py change LOG to logger The convention in most other files is to use "logger" for the log handle, so this file using "LOG" looks a bit odd/inconsistent ref bug 1150091 Change-Id: I159ad59dfaa3a1db36aad11cb6ce9625f1105c51 --- heat/common/policy.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/heat/common/policy.py b/heat/common/policy.py index 5ca2155f..b017aa44 100644 --- a/heat/common/policy.py +++ b/heat/common/policy.py @@ -27,7 +27,7 @@ from heat.common import exception import heat.openstack.common.log as logging from heat.openstack.common import policy -LOG = logging.getLogger(__name__) +logger = logging.getLogger(__name__) policy_opts = [ cfg.StrOpt('policy_file', default='policy.json'), @@ -69,8 +69,8 @@ class Enforcer(object): rule_type = "default " text_rules = dict((k, str(v)) for k, v in rules.items()) - LOG.debug(_('Loaded %(rule_type)spolicy rules: %(text_rules)s') % - locals()) + logger.debug(_('Loaded %(rule_type)spolicy rules: %(text_rules)s') % + locals()) self.set_rules(rules) @@ -81,7 +81,7 @@ class Enforcer(object): if policy_file: return policy_file else: - LOG.warn(_('Unable to find policy file')) + logger.warn(_('Unable to find policy file')) return None def _read_policy_file(self): @@ -91,7 +91,7 @@ class Enforcer(object): """ mtime = os.path.getmtime(self.policy_path) if not self.policy_file_contents or mtime != self.policy_file_mtime: - LOG.debug(_("Loading policy from %s") % self.policy_path) + logger.debug(_("Loading policy from %s") % self.policy_path) with open(self.policy_path) as fap: raw_contents = fap.read() rules_dict = json.loads(raw_contents) -- 2.45.2