Silence urllib3 redundant logging.

This patch makes the default logging level of heat-keystone-setup-domain
to be WARNING and the 'urllib3.connectionpool' logging level to be
WARNING as well.

The intent is to remove unncecessary logging information from urllib3
library.

Closes-Bug: 1358093
Change-Id: I650e80aa1093c8c7e7c5dac3694d58139d2ec260
This commit is contained in:
tengqm 2014-08-18 12:37:31 +08:00
parent a68e08cb47
commit 4155c1e588

View File

@ -55,10 +55,11 @@ logger.debug("AUTH_URL=%s" % AUTH_URL)
def main():
log_lvl = logging.DEBUG if DEBUG else logging.INFO
log_lvl = logging.DEBUG if DEBUG else logging.WARNING
logging.basicConfig(
format="%(levelname)s (%(module)s:%(lineno)d) %(message)s",
level=log_lvl)
logging.getLogger('urllib3.connectionpool').setLevel(logging.WARNING)
c = client.Client(debug=DEBUG,
username=USERNAME,