summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeha Alhat <neha.alhat@nttdata.com>2018-06-06 15:14:23 +0530
committerNeha Alhat <neha.alhat@nttdata.com>2018-06-26 14:46:30 +0530
commitebb3b675ade348f52d3e0260bda3c0df843108c9 (patch)
tree1d61db3f555a17e0f22fc90e0ae9c078ba535900
parent35b99baf6e0da5b13fa72b50d7a20ff1944776de (diff)
downloadpython-cinderclient-ebb3b675ade348f52d3e0260bda3c0df843108c9.tar.gz
Remove initialization of logger if logger is None
If default_log_level=keystoneauth=WARN is enabled in nova.conf, then these log messages [1][2][3] are logged using cinderclient.v3.client logger name instead of keystoneauth.session. This is because cinderclient initializes logger if not passed by nova and since debug=True is set in nova.conf it’s uses root logger log level. This patch removes initialization of logger code to ensure log messages[1][2][3] are logged only when keystoneauth=DEBUG is enabled in nova.conf. This will also enable us to consume split_logger config option [4] when enabled in nova without making any additional changes in client code. [1] REQ: https://review.openstack.org/#/c/505764/8/keystoneauth1/session.py@391 [2] RESP: https://review.openstack.org/#/c/505764/8/keystoneauth1/session.py@422 [3] RESP BODY: https://review.openstack.org/#/c/505764/8/keystoneauth1/session.py@454 [4] https://review.openstack.org/#/c/568878/ Change-Id: I937c6ac2f6e254c438ee2f36eb6c291f62c0f411
-rw-r--r--cinderclient/v3/client.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/cinderclient/v3/client.py b/cinderclient/v3/client.py
index 5eb5268..c1e8877 100644
--- a/cinderclient/v3/client.py
+++ b/cinderclient/v3/client.py
@@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
-
from cinderclient import api_versions
from cinderclient import client
from cinderclient.v3 import attachments
@@ -112,9 +110,6 @@ class Client(object):
setattr(self, extension.name,
extension.manager_class(self))
- if not logger:
- logger = logging.getLogger(__name__)
-
self.client = client._construct_http_client(
username=username,
password=password,