log-cleanup: honor --default-log-level in case of --verbose
if the default log level is explicitly specified by --default-log-level option, use the level rather than defaulting to logging.DEBUG. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
998a8ad543
commit
43daf0bad0
@ -78,9 +78,9 @@ def init_log():
|
||||
mode = int(CONF.log_file_mode, 8)
|
||||
os.chmod(log_file, mode)
|
||||
|
||||
if CONF.verbose:
|
||||
log.setLevel(logging.DEBUG)
|
||||
elif CONF.default_log_level is not None:
|
||||
if CONF.default_log_level is not None:
|
||||
log.setLevel(CONF.default_log_level)
|
||||
elif CONF.verbose:
|
||||
log.setLevel(logging.DEBUG)
|
||||
else:
|
||||
log.setLevel(logging.INFO)
|
||||
|
Loading…
Reference in New Issue
Block a user