fix log level parsing
This commit is contained in:
parent
beb81f348f
commit
8664a48477
|
@ -57,7 +57,10 @@ class AnsibleDoctor:
|
|||
except ansibledoctor.Exception.ConfigError as e:
|
||||
self.log.sysexit_with_message(e)
|
||||
|
||||
self.log.set_level(config.config["logging"]["level"])
|
||||
try:
|
||||
self.log.set_level(config.config["logging"]["level"])
|
||||
except ValueError as e:
|
||||
self.log.sysexit_with_message("Can not set log level.\n{}".format(str(e)))
|
||||
|
||||
if config.is_role:
|
||||
self.logger.info("Ansible role detected")
|
||||
|
|
|
@ -7,6 +7,7 @@ import sys
|
|||
import anyconfig
|
||||
import environs
|
||||
import jsonschema.exceptions
|
||||
import logging
|
||||
import yaml
|
||||
from appdirs import AppDirs
|
||||
from jsonschema._utils import format_as_index
|
||||
|
|
Loading…
Reference in New Issue