diff options
author | 2015-04-30 14:21:51 -0400 | |
---|---|---|
committer | 2015-04-30 14:21:51 -0400 | |
commit | 31bce95b090a205ba9da8bdf8f385ac412b170a0 (patch) | |
tree | 1b2c430e8803b2a48774dc2f395f31121afe32db /os_net_config/cli.py | |
parent | 3f36600d1c7159f3ba00a2449e381cd32239af4e (diff) |
-v trumps -d on the CLI
This patch updates the handling of the --debug and --verbose
options so that if both are specified then log level is set to
DEBUG.
Change-Id: I65d5665631f5575d1c8343bb7c1b197a61e0e176
Closes-bug: #1450586
Diffstat (limited to 'os_net_config/cli.py')
-rw-r--r-- | os_net_config/cli.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/os_net_config/cli.py b/os_net_config/cli.py index c3a6358..aeccb26 100644 --- a/os_net_config/cli.py +++ b/os_net_config/cli.py @@ -99,10 +99,10 @@ def configure_logger(verbose=False, debug=False): DATE_FORMAT = '%Y/%m/%d %I:%M:%S %p' log_level = logging.WARN - if verbose: - log_level = logging.INFO - elif debug: + if debug: log_level = logging.DEBUG + elif verbose: + log_level = logging.INFO logging.basicConfig(format=LOG_FORMAT, datefmt=DATE_FORMAT, level=log_level) |