From 21bd4619ae61dfe849fea01211e6c45a86df77c5 Mon Sep 17 00:00:00 2001
From: Dean Troyer <dtroyer@gmail.com>
Date: Tue, 8 Jul 2014 01:44:55 -0500
Subject: [PATCH] Clean up make_client() logging

Change-Id: I0b6760a6401b50e3dfb891af75424ae89df42ebc
---
 openstackclient/compute/client.py  | 2 +-
 openstackclient/identity/client.py | 6 ++++--
 openstackclient/image/client.py    | 1 +
 openstackclient/network/client.py  | 2 ++
 openstackclient/object/client.py   | 3 ++-
 openstackclient/volume/client.py   | 3 +--
 6 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/openstackclient/compute/client.py b/openstackclient/compute/client.py
index 3dacee88cf..6a7e3fe610 100644
--- a/openstackclient/compute/client.py
+++ b/openstackclient/compute/client.py
@@ -34,7 +34,7 @@ def make_client(instance):
         API_NAME,
         instance._api_version[API_NAME],
         API_VERSIONS)
-    LOG.debug('instantiating compute client: %s', compute_client)
+    LOG.debug('Instantiating compute client: %s', compute_client)
 
     # Set client http_log_debug to True if verbosity level is high enough
     http_log_debug = utils.get_effective_log_level() <= logging.DEBUG
diff --git a/openstackclient/identity/client.py b/openstackclient/identity/client.py
index 32a2c23b79..72e8bfaec0 100644
--- a/openstackclient/identity/client.py
+++ b/openstackclient/identity/client.py
@@ -36,8 +36,10 @@ def make_client(instance):
         API_NAME,
         instance._api_version[API_NAME],
         API_VERSIONS)
+    LOG.debug('Instantiating identity client: %s' % identity_client)
+
     if instance._url:
-        LOG.debug('instantiating identity client: token flow')
+        LOG.debug('Using token auth')
         client = identity_client(
             endpoint=instance._url,
             token=instance._token,
@@ -46,7 +48,7 @@ def make_client(instance):
             trust_id=instance._trust_id,
         )
     else:
-        LOG.debug('instantiating identity client: password flow')
+        LOG.debug('Using password auth')
         client = identity_client(
             username=instance._username,
             password=instance._password,
diff --git a/openstackclient/image/client.py b/openstackclient/image/client.py
index ba48a0e967..a23d349e01 100644
--- a/openstackclient/image/client.py
+++ b/openstackclient/image/client.py
@@ -38,6 +38,7 @@ def make_client(instance):
         API_NAME,
         instance._api_version[API_NAME],
         API_VERSIONS)
+    LOG.debug('Instantiating image client: %s', image_client)
 
     if not instance._url:
         instance._url = instance.get_endpoint_for_service_type(API_NAME)
diff --git a/openstackclient/network/client.py b/openstackclient/network/client.py
index db0b5279d8..d3102da1eb 100644
--- a/openstackclient/network/client.py
+++ b/openstackclient/network/client.py
@@ -32,6 +32,8 @@ def make_client(instance):
         API_NAME,
         instance._api_version[API_NAME],
         API_VERSIONS)
+    LOG.debug('Instantiating network client: %s', network_client)
+
     if not instance._url:
         instance._url = instance.get_endpoint_for_service_type("network")
     return network_client(
diff --git a/openstackclient/object/client.py b/openstackclient/object/client.py
index 273bea6ee8..4fe59794aa 100644
--- a/openstackclient/object/client.py
+++ b/openstackclient/object/client.py
@@ -35,11 +35,12 @@ def make_client(instance):
         API_NAME,
         instance._api_version[API_NAME],
         API_VERSIONS)
+    LOG.debug('Instantiating object client: %s' % object_client)
+
     if instance._url:
         endpoint = instance._url
     else:
         endpoint = instance.get_endpoint_for_service_type(API_NAME)
-    LOG.debug('instantiating object client')
     client = object_client(
         endpoint=endpoint,
         token=instance._token,
diff --git a/openstackclient/volume/client.py b/openstackclient/volume/client.py
index 9b37b8f53c..f630f9f58c 100644
--- a/openstackclient/volume/client.py
+++ b/openstackclient/volume/client.py
@@ -40,8 +40,7 @@ def make_client(instance):
         instance._api_version[API_NAME],
         API_VERSIONS
     )
-
-    LOG.debug('instantiating volume client')
+    LOG.debug('Instantiating volume client: %s', volume_client)
 
     # Set client http_log_debug to True if verbosity level is high enough
     http_log_debug = utils.get_effective_log_level() <= logging.DEBUG