]> git.ipfire.org Git - collecty.git/commitdiff
Silence non-debugging output a bit
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 May 2015 19:21:01 +0000 (19:21 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 May 2015 19:21:01 +0000 (19:21 +0000)
src/collecty/daemon.py
src/collecty/plugins/base.py

index 2fa000f0e45ef03aca0400cda3f9207f0001f6ff..0f1c34d7b77ce61e07d0adf4bd7da9b8c79496e8 100644 (file)
@@ -64,7 +64,7 @@ class Collecty(object):
                for plugin in plugins.get():
                        self.add_plugin(plugin)
 
-               log.info(_("Collecty successfully initialized with %s plugins") \
+               log.debug(_("Collecty successfully initialized with %s plugins") \
                        % len(self.plugins))
 
        def add_plugin(self, plugin_class):
@@ -122,7 +122,7 @@ class Collecty(object):
                if not self.running:
                        return
 
-               log.debug(_("Received shutdown signal"))
+               log.info(_("Received shutdown signal"))
                self.running = False
 
                # Propagating shutdown to all threads.
@@ -169,7 +169,6 @@ class WriteQueue(threading.Thread):
                self.collecty = collecty
 
                self.log = logging.getLogger("collecty.queue")
-               self.log.setLevel(logging.DEBUG)
                self.log.propagate = 1
 
                self.timer = plugins.Timer(submit_interval)
@@ -235,12 +234,11 @@ class WriteQueue(threading.Thread):
                self.log.debug(_("Emptied write queue in %.2fs") % duration)
 
        def _commit_file(self, filename, results):
-               self.log.debug(_("Committing %(counter)s entries to %(filename)s:") \
+               self.log.debug(_("Committing %(counter)s entries to %(filename)s") \
                        % { "counter" : len(results), "filename" : filename })
 
-               if self.collecty.debug:
-                       for result in results:
-                               self.log.debug("  %s: %s" % (result.time, result.data))
+               for result in results:
+                       self.log.debug("  %s: %s" % (result.time, result.data))
 
                rrdtool.update(filename, *["%s" % r for r in results])
 
index 74bc7122a812fe8935d2e36dd6eeda84ec67843c..1a03105eeabbcd97af4ba744a7d19ea13ee356c3 100644 (file)
@@ -126,7 +126,7 @@ class Plugin(threading.Thread):
                self.running = True
                self.timer = Timer(self.interval)
 
-               self.log.info(_("Successfully initialized %s") % self.__class__.__name__)
+               self.log.debug(_("Successfully initialized %s") % self.__class__.__name__)
 
        @property
        def path(self):
@@ -221,7 +221,7 @@ class Plugin(threading.Thread):
                graph = template.generate_graph(object_id=object_id, **kwargs)
 
                duration = time.time() - time_start
-               self.log.info(_("Generated graph %s in %.1fms") \
+               self.log.debug(_("Generated graph %s in %.1fms") \
                        % (template, duration * 1000))
 
                return graph