From 5d49754d5cf0819d00d31d47171e4a3e239fbd4b Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 21 Jul 2011 12:26:24 +0000 Subject: Initialize the logger before we call parse, so if an exception gets thrown out of there it will be formatted properly. Then set the level after getting the arguments. --- configure.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'configure.py') diff --git a/configure.py b/configure.py index 628a9ecc7..9e26ba3b0 100755 --- a/configure.py +++ b/configure.py @@ -1634,6 +1634,9 @@ def main(argv = None): if argv is None: argv = sys.argv + logging.basicConfig(stream = sys.stdout, + format = '%(levelname) 7s: %(message)s') + options = process_command_line(argv[1:]) def log_level(): @@ -1643,9 +1646,7 @@ def main(argv = None): return logging.WARNING return logging.INFO - logging.basicConfig(stream = sys.stdout, - format = '%(levelname) 7s: %(message)s', - level = log_level()) + logging.getLogger().setLevel(log_level()) logging.debug('%s invoked with options "%s"' % ( argv[0], ' '.join(argv[1:]))) -- cgit v1.2.3