← Back to team overview

cloud-init-dev team mailing list archive

[Merge] lp:~harlowja/cloud-init/less-noise into lp:cloud-init

 

Joshua Harlow has proposed merging lp:~harlowja/cloud-init/less-noise into lp:cloud-init.

Requested reviews:
  cloud init development team (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~harlowja/cloud-init/less-noise/+merge/226940

Less noisy logs.

Removes some of the log messages that are not really meaningful.
-- 
https://code.launchpad.net/~harlowja/cloud-init/less-noise/+merge/226940
Your team cloud init development team is requested to review the proposed merge of lp:~harlowja/cloud-init/less-noise into lp:cloud-init.
=== modified file 'cloudinit/importer.py'
--- cloudinit/importer.py	2013-10-09 19:22:06 +0000
+++ cloudinit/importer.py	2014-07-15 22:10:09 +0000
@@ -45,8 +45,6 @@
         real_path.append(base_name)
         full_path = '.'.join(real_path)
         real_paths.append(full_path)
-    LOG.debug("Looking for modules %s that have attributes %s",
-              real_paths, required_attrs)
     for full_path in real_paths:
         mod = None
         try:
@@ -62,6 +60,4 @@
                 found_attrs += 1
         if found_attrs == len(required_attrs):
             found_places.append(full_path)
-    LOG.debug("Found %s with attributes %s in %s", base_name,
-              required_attrs, found_places)
     return found_places

=== modified file 'cloudinit/mergers/__init__.py'
--- cloudinit/mergers/__init__.py	2013-05-03 21:41:28 +0000
+++ cloudinit/mergers/__init__.py	2014-07-15 22:10:09 +0000
@@ -55,9 +55,6 @@
         if not meth:
             meth = self._handle_unknown
             args.insert(0, method_name)
-        LOG.debug("Merging '%s' into '%s' using method '%s' of '%s'",
-                  type_name, type_utils.obj_name(merge_with),
-                  meth.__name__, self)
         return meth(*args)
 
 
@@ -84,8 +81,6 @@
                 # First one that has that method/attr gets to be
                 # the one that will be called
                 meth = getattr(merger, meth_wanted)
-                LOG.debug(("Merging using located merger '%s'"
-                            " since it had method '%s'"), merger, meth_wanted)
                 break
         if not meth:
             return UnknownMerger._handle_unknown(self, meth_wanted,

=== modified file 'cloudinit/stages.py'
--- cloudinit/stages.py	2014-02-13 18:53:08 +0000
+++ cloudinit/stages.py	2014-07-15 22:10:09 +0000
@@ -397,8 +397,8 @@
                     mod = handlers.fixup_handler(mod)
                     types = c_handlers.register(mod)
                     if types:
-                        LOG.debug("Added custom handler for %s from %s",
-                                  types, fname)
+                        LOG.debug("Added custom handler for %s [%s] from %s",
+                                  types, mod, fname)
                 except Exception:
                     util.logexc(LOG, "Failed to register handler from %s",
                                 fname)
@@ -644,6 +644,8 @@
                     freq = mod.frequency
                 if not freq in FREQUENCIES:
                     freq = PER_INSTANCE
+                LOG.debug("Running module %s (%s) with frequency %s",
+                          name, mod, freq)
 
                 # Use the configs logger and not our own
                 # TODO(harlowja): possibly check the module
@@ -657,7 +659,7 @@
                 run_name = "config-%s" % (name)
                 cc.run(run_name, mod.handle, func_args, freq=freq)
             except Exception as e:
-                util.logexc(LOG, "Running %s (%s) failed", name, mod)
+                util.logexc(LOG, "Running module %s (%s) failed", name, mod)
                 failures.append((name, e))
         return (which_ran, failures)
 


Follow ups