diff options
author | lloyd <[email protected]> | 2011-07-21 12:26:24 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-07-21 12:26:24 +0000 |
commit | 5d49754d5cf0819d00d31d47171e4a3e239fbd4b (patch) | |
tree | bfb788620d360802bf57936189f133ac165d4d97 | |
parent | e7fb8e717d7b4ba7bb3a4ba69a14d484b17abbac (diff) |
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.
-rwxr-xr-x | configure.py | 7 |
1 files changed, 4 insertions, 3 deletions
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:]))) |