From a415cc4b91e531ac6eb5a53c578403fd878d480c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Oct 2011 01:38:22 +0200 Subject: [PATCH] add correct logger in manifest Signed-off-by: Nico Schottelius --- lib/cdist/core/manifest.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/cdist/core/manifest.py b/lib/cdist/core/manifest.py index 8f9903a5..50964fdc 100644 --- a/lib/cdist/core/manifest.py +++ b/lib/cdist/core/manifest.py @@ -25,9 +25,6 @@ import os import cdist -log = logging.getLogger(__name__) - - ''' common: runs only locally, does not need remote @@ -68,13 +65,16 @@ class Manifest(object): def __init__(self, target_host, local): self.target_host = target_host self.local = local + + self.log = logging.getLogger(self.target_host) + self.env = { 'PATH': "%s:%s" % (self.local.bin_path, os.environ['PATH']), '__target_host': self.target_host, '__global': self.local.out_path, '__cdist_type_base_path': self.local.type_path, # for use in type emulator } - if log.getEffectiveLevel() == logging.DEBUG: + if self.log.getEffectiveLevel() == logging.DEBUG: self.env.update({'__debug': "yes" }) @@ -83,7 +83,7 @@ class Manifest(object): env.update(self.env) env['__manifest'] = self.local.manifest_path env['__cdist_manifest'] = script - log.info("Running initial manifest " + self.local.manifest_path) + self.log.info("Running initial manifest " + self.local.manifest_path) self.local.run_script(script, env=env) def run_type_manifest(self, cdist_object):