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):
if not self.running:
return
- log.debug(_("Received shutdown signal"))
+ log.info(_("Received shutdown signal"))
self.running = False
# Propagating shutdown to all threads.
self.collecty = collecty
self.log = logging.getLogger("collecty.queue")
- self.log.setLevel(logging.DEBUG)
self.log.propagate = 1
self.timer = plugins.Timer(submit_interval)
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])
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):
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