From f6e1174adb16d89af78f2dbfbafd1c1eda167c67 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 3 Jul 2017 13:32:39 +0200 Subject: [PATCH] start moving info log messages to verbose Signed-off-by: Steven Armstrong --- cdist/config.py | 13 ++++++------- cdist/core/explorer.py | 4 ++-- cdist/core/manifest.py | 4 ++-- scripts/cdist | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/cdist/config.py b/cdist/config.py index b17ec67f..d0478c8c 100644 --- a/cdist/config.py +++ b/cdist/config.py @@ -166,7 +166,7 @@ class Config(object): failed_hosts.append(host) time_end = time.time() - log.info("Total processing time for %s host(s): %s", hostcnt, + log.verbose("Total processing time for %s host(s): %s", hostcnt, (time_end - time_start)) if len(failed_hosts) > 0: @@ -466,8 +466,8 @@ class Config(object): def object_prepare(self, cdist_object): """Prepare object: Run type explorer + manifest""" - self.log.info("Preparing object {}".format(cdist_object.name)) - self.log.info( + self.log.verbose("Preparing object {}".format(cdist_object.name)) + self.log.verbose( "Running manifest and explorers for " + cdist_object.name) self.explorer.run_type_explorers(cdist_object) self.manifest.run_type_manifest(cdist_object) @@ -476,8 +476,7 @@ class Config(object): def object_run(self, cdist_object): """Run gencode and code for an object""" - self.log.info("Running object " + cdist_object.name) - self.log.verbose("Trying to run object %s" % (cdist_object.name)) + self.log.verbose("Running object " + cdist_object.name) if cdist_object.state == core.CdistObject.STATE_DONE: raise cdist.Error(("Attempting to run an already finished " "object: %s"), cdist_object) @@ -494,7 +493,7 @@ class Config(object): # Execute if not self.dry_run: if cdist_object.code_local or cdist_object.code_remote: - self.log.info("Executing code for %s" % (cdist_object.name)) + self.log.info("Updating %s" % (cdist_object.name)) if cdist_object.code_local: self.log.trace("Executing local code for %s" % (cdist_object.name)) @@ -505,7 +504,7 @@ class Config(object): self.code.transfer_code_remote(cdist_object) self.code.run_code_remote(cdist_object) else: - self.log.info("Skipping code execution due to DRY RUN") + self.log.verbose("Skipping code execution due to DRY RUN") # Mark this object as done self.log.trace("Finishing run of " + cdist_object.name) diff --git a/cdist/core/explorer.py b/cdist/core/explorer.py index b5c00897..0d47e45e 100644 --- a/cdist/core/explorer.py +++ b/cdist/core/explorer.py @@ -95,7 +95,7 @@ class Explorer(object): out_path directory. """ - self.log.info("Running global explorers") + self.log.verbose("Running global explorers") self.transfer_global_explorers() if self.jobs is None: self._run_global_explorers_seq(out_path) @@ -168,7 +168,7 @@ class Explorer(object): in the object. """ - self.log.info("Running type explorers for {}".format( + self.log.verbose("Running type explorers for {}".format( cdist_object.cdist_type)) self.log.trace("Transfering type explorers for type: %s", cdist_object.cdist_type) diff --git a/cdist/core/manifest.py b/cdist/core/manifest.py index 16c08353..d8570097 100644 --- a/cdist/core/manifest.py +++ b/cdist/core/manifest.py @@ -149,7 +149,7 @@ class Manifest(object): raise NoInitialManifestError(initial_manifest, user_supplied) message_prefix = "initialmanifest" - self.log.info("Running initial manifest " + initial_manifest) + self.log.verbose("Running initial manifest " + initial_manifest) self.local.run_script(initial_manifest, env=self.env_initial_manifest(initial_manifest), message_prefix=message_prefix, @@ -176,7 +176,7 @@ class Manifest(object): cdist_object.cdist_type.manifest_path) message_prefix = cdist_object.name if os.path.isfile(type_manifest): - self.log.info("Running type manifest " + type_manifest) + self.log.verbose("Running type manifest " + type_manifest) self.local.run_script(type_manifest, env=self.env_type_manifest(cdist_object), message_prefix=message_prefix, diff --git a/scripts/cdist b/scripts/cdist index b55091f9..81220ca3 100755 --- a/scripts/cdist +++ b/scripts/cdist @@ -42,7 +42,7 @@ def commandline(): # Loglevels are handled globally in here cdist.argparse.handle_loglevel(args) - log.info("version %s" % cdist.VERSION) + log.verbose("version %s" % cdist.VERSION) log.trace(args) # Work around python 3.3 bug: