summaryrefslogtreecommitdiff
path: root/heatclient/shell.py
diff options
context:
space:
mode:
authorSteve Baker <sbaker@redhat.com>2014-06-25 17:27:00 +1200
committerSteve Baker <sbaker@redhat.com>2014-06-25 17:27:00 +1200
commitdc5911e1a34b3323820cd573e094e1ac59fd0987 (patch)
tree2778032798f110c1d21784005d33d9b7a724c8f4 /heatclient/shell.py
parenta1168900dc3c66dc3d2ea9e2081dc130635dea8f (diff)
downloadpython-heatclient-dc5911e1a34b3323820cd573e094e1ac59fd0987.tar.gz
Improve --debug logging output
This change makes the following improvements to the output of a heat command with the --debug option set: * Silences spurious logging from iso8601 and urllib3.connectionpool * Removes the line number from the logging format, since the intent of --debug is to show the user what network requests are occuring. Change-Id: Iccbae01a1a5b85db0770a4f56c3b48788dc3008a Closes-bug: #1324470
Diffstat (limited to 'heatclient/shell.py')
-rw-r--r--heatclient/shell.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/heatclient/shell.py b/heatclient/shell.py
index 22173f5..cd00ac6 100644
--- a/heatclient/shell.py
+++ b/heatclient/shell.py
@@ -283,8 +283,10 @@ class HeatShell(object):
def _setup_logging(self, debug):
log_lvl = logging.DEBUG if debug else logging.WARNING
logging.basicConfig(
- format="%(levelname)s (%(module)s:%(lineno)d) %(message)s",
+ format="%(levelname)s (%(module)s) %(message)s",
level=log_lvl)
+ logging.getLogger('iso8601').setLevel(logging.WARNING)
+ logging.getLogger('urllib3.connectionpool').setLevel(logging.WARNING)
def _setup_verbose(self, verbose):
if verbose: