From 761ffc241dd19e6f982ec1498d53477022a2dc10 Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Mon, 28 Jul 2014 13:57:46 +1000 Subject: [PATCH] Override configure_logging to quieten iso8601 and requests This prevents the following messy output: Starting new HTTP connection (1): localhost Change-Id: Ibb80f792939441dc90c4a041ae83f38b0c7e3ec2 --- mistralclient/shell.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mistralclient/shell.py b/mistralclient/shell.py index 8db99c77..0c07e8c3 100644 --- a/mistralclient/shell.py +++ b/mistralclient/shell.py @@ -70,6 +70,12 @@ class MistralShell(App): for k, v in self.commands.items(): self.command_manager.add_command(k, v) + def configure_logging(self): + super(MistralShell, self).configure_logging() + logging.getLogger('iso8601').setLevel(logging.WARNING) + if self.options.verbose_level <= 1: + logging.getLogger('requests').setLevel(logging.WARNING) + def build_option_parser(self, description, version, argparse_kwargs=None): """Return an argparse option parser for this application.