summaryrefslogtreecommitdiff
path: root/heatclient/shell.py
diff options
context:
space:
mode:
authorSteve Baker <sbaker@redhat.com>2012-10-18 11:56:24 +1000
committerSteve Baker <sbaker@redhat.com>2012-10-18 11:56:24 +1000
commitb6debe5cb0621220bfedf94b28acc13c90151406 (patch)
treeac48c065dca9b652ff389ff8f7fce6e35846410a /heatclient/shell.py
parent317757c1646635de29b622f422432c1fc74dc6fb (diff)
downloadpython-heatclient-b6debe5cb0621220bfedf94b28acc13c90151406.tar.gz
Properly configure debug logging
Diffstat (limited to 'heatclient/shell.py')
-rw-r--r--heatclient/shell.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/heatclient/shell.py b/heatclient/shell.py
index 9244780..41a5228 100644
--- a/heatclient/shell.py
+++ b/heatclient/shell.py
@@ -228,11 +228,9 @@ class HeatShell(object):
if not debug:
return
- streamhandler = logging.StreamHandler()
- streamformat = "%(levelname)s (%(module)s:%(lineno)d) %(message)s"
- streamhandler.setFormatter(logging.Formatter(streamformat))
- logger.setLevel(logging.DEBUG)
- logger.addHandler(streamhandler)
+ logging.basicConfig(
+ format="%(levelname)s (%(module)s:%(lineno)d) %(message)s",
+ level=logging.DEBUG)
httplib2.debuglevel = 1