summaryrefslogtreecommitdiff
path: root/openstackclient/identity
diff options
context:
space:
mode:
authorsunyajing <yajing.sun@easystack.cn>2016-06-23 14:53:57 +0800
committersunyajing <yajing.sun@easystack.cn>2016-06-23 08:22:51 +0000
commite8483c90229fbb40408358ff307402469e12c26f (patch)
treeec23b70754d4417c9a72a537b22260862a6722dc /openstackclient/identity
parent51fcd7c30c466b1241b6f148390c83caca578c49 (diff)
downloadpython-openstackclient-e8483c90229fbb40408358ff307402469e12c26f.tar.gz
Standardize logger usage of catalog in identity
Change-Id: I5307f949b3a350e41840a4a5c191ceacf1b3b291 Partially-Implements: blueprint log-usage
Diffstat (limited to 'openstackclient/identity')
-rw-r--r--openstackclient/identity/v2_0/catalog.py8
-rw-r--r--openstackclient/identity/v3/catalog.py8
2 files changed, 12 insertions, 4 deletions
diff --git a/openstackclient/identity/v2_0/catalog.py b/openstackclient/identity/v2_0/catalog.py
index 62e6b1f9..7a15cf3a 100644
--- a/openstackclient/identity/v2_0/catalog.py
+++ b/openstackclient/identity/v2_0/catalog.py
@@ -13,6 +13,8 @@
"""Identity v2 Service Catalog action implementations"""
+import logging
+
from osc_lib.command import command
from osc_lib import exceptions
from osc_lib import utils
@@ -21,6 +23,9 @@ import six
from openstackclient.i18n import _
+LOG = logging.getLogger(__name__)
+
+
def _format_endpoints(eps=None):
if not eps:
return ""
@@ -92,8 +97,7 @@ class ShowCatalog(command.ShowOne):
break
if not data:
- self.app.log.error(_('service %s not found\n') %
- parsed_args.service)
+ LOG.error(_('service %s not found\n'), parsed_args.service)
return ((), ())
return zip(*sorted(six.iteritems(data)))
diff --git a/openstackclient/identity/v3/catalog.py b/openstackclient/identity/v3/catalog.py
index a6e141c9..a62d0a93 100644
--- a/openstackclient/identity/v3/catalog.py
+++ b/openstackclient/identity/v3/catalog.py
@@ -13,6 +13,8 @@
"""Identity v3 Service Catalog action implementations"""
+import logging
+
from osc_lib.command import command
from osc_lib import exceptions
from osc_lib import utils
@@ -21,6 +23,9 @@ import six
from openstackclient.i18n import _
+LOG = logging.getLogger(__name__)
+
+
def _format_endpoints(eps=None):
if not eps:
return ""
@@ -87,8 +92,7 @@ class ShowCatalog(command.ShowOne):
break
if not data:
- self.app.log.error(_('service %s not found\n') %
- parsed_args.service)
+ LOG.error(_('service %s not found\n'), parsed_args.service)
return ((), ())
return zip(*sorted(six.iteritems(data)))