__cdist_log_level=<log level int value>; __cdist_log_level_name=<log level name> (#574)

This commit is contained in:
Darko Poljak 2017-09-11 09:06:47 +02:00 committed by GitHub
commit f0dc21ec0c
20 changed files with 192 additions and 40 deletions

View file

@ -112,8 +112,7 @@ class Emulator(object):
if '__cdist_log_level' in self.env:
try:
loglevel = self.env['__cdist_log_level']
# For a text level it returns its numerical value.
level = logging.getLevelName(loglevel)
level = int(loglevel)
except ValueError:
level = logging.WARNING
else: