diff options
author | Nicolas Simonds <nic@metacloud.com> | 2013-05-21 16:25:11 -0700 |
---|---|---|
committer | Nicolas Simonds <nic@metacloud.com> | 2013-05-21 16:25:11 -0700 |
commit | de6f5120510c73ff4de376f5a361d1293f1d68a6 (patch) | |
tree | 51b4150f9735d9d92655e727862c70fd8f34a42b /keystoneclient/client.py | |
parent | 40db3fb6ad8bb343c026dd8eaaa4929e8727636a (diff) | |
download | python-keystoneclient-de6f5120510c73ff4de376f5a361d1293f1d68a6.tar.gz |
Only add logging handlers if there currently aren't any
This corrects an odd problem where Horizon would stand up multiple
client objects, which would cause duplicate/triplicate/dozens of
repeated log lines in its log files, due to multiple identical
handlers being added to the logging object
Fixes Bug 1182678
Change-Id: I020b3999c9008b996286ccb74a7801c96c43e71c
Diffstat (limited to 'keystoneclient/client.py')
-rw-r--r-- | keystoneclient/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/keystoneclient/client.py b/keystoneclient/client.py index e3c2ed5..b75ae54 100644 --- a/keystoneclient/client.py +++ b/keystoneclient/client.py @@ -113,7 +113,7 @@ class HTTPClient(object): # logging setup self.debug_log = debug - if self.debug_log: + if self.debug_log and not _logger.handlers: ch = logging.StreamHandler() _logger.setLevel(logging.DEBUG) _logger.addHandler(ch) |