launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25211
[Merge] ~cjwatson/launchpad:swiftclient-debug into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:swiftclient-debug into launchpad:master.
Commit message:
Support swiftclient debug logging via environment
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/389725
Although normally swiftclient's debug logs are very noisy, in exceptional circumstances it can be necessary to see them. Support this by way of an LP_SWIFTCLIENT_DEBUG environment variable.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:swiftclient-debug into launchpad:master.
diff --git a/lib/lp_sitecustomize.py b/lib/lp_sitecustomize.py
index 26085c0..d80f76b 100644
--- a/lib/lp_sitecustomize.py
+++ b/lib/lp_sitecustomize.py
@@ -96,8 +96,9 @@ def silence_swiftclient_logger():
keystoneclient logs credentials at DEBUG.
"""
- swiftclient_logger = logging.getLogger('swiftclient')
- swiftclient_logger.setLevel(logging.INFO)
+ if not os.environ.get('LP_SWIFTCLIENT_DEBUG'):
+ swiftclient_logger = logging.getLogger('swiftclient')
+ swiftclient_logger.setLevel(logging.INFO)
keystoneclient_logger = logging.getLogger('keystoneclient')
keystoneclient_logger.setLevel(logging.INFO)