forked from ungleich-public/cdist
Respect cdist log level in emulator.
This commit is contained in:
parent
1fa37566cb
commit
314a931b84
3 changed files with 7 additions and 6 deletions
|
|
@ -104,10 +104,11 @@ class Emulator(object):
|
|||
def __init_log(self):
|
||||
"""Setup logging facility"""
|
||||
|
||||
if '__cdist_debug' in self.env:
|
||||
logging.root.setLevel(logging.DEBUG)
|
||||
if '__cdist_loglevel' in self.env:
|
||||
level = int(self.env['__cdist_loglevel'])
|
||||
else:
|
||||
logging.root.setLevel(logging.INFO)
|
||||
level = logging.OFF
|
||||
logging.root.setLevel(level)
|
||||
|
||||
self.log = logging.getLogger(self.target_host[0])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue