@cryptotaxi247 / netdata-1 / commits / dbe2196c1

little bit more debug()

paulfantom committed Jun 21, 2016 at 17:37 UTC dbe2196c1dca6c1f44fa2a0b36c98b04b1a98193
1 file changed +4 -2
plugins.d/python.d.plugin
+4 -2
@@ -364,11 +364,12 @@ class PythonCharts(object):
364 if not job.check():
365 self._stop(job, "failed check")
366 else:
367 + debug(job.name, ": check succeeded")
368 i += 1
369 except AttributeError:
370 self._stop(job, "no check")
371 except (UnboundLocalError, Exception) as e:
371 - self._stop(job, "misbehaving. Reason: " + str(e))
372 + self._stop(job, "misbehaving. Reason:", str(e))
373
374 def create(self):
375 """
@@ -384,7 +385,6 @@ class PythonCharts(object):
385 if not job.create():
386 self._stop(job, "failed create")
387 else:
387 - debug("created charts for", job.chart_name)
388 chart = job.chart_name
389 sys.stdout.write(
390 "CHART netdata.plugin_pythond_" +
@@ -395,6 +395,7 @@ class PythonCharts(object):
395 str(job.timetable['freq']) +
396 '\n')
397 sys.stdout.write("DIMENSION run_time 'run time' absolute 1 1\n\n")
398 + debug("created charts for", job.chart_name)
399 # sys.stdout.flush()
400 i += 1
401 except AttributeError:
@@ -417,6 +418,7 @@ class PythonCharts(object):
418 t_start = time.time()
419 # check if it is time to execute job update() function
420 if job.timetable['next'] > t_start:
421 + debug("it is not a time to invoke update on", job.chart_name)
422 return True
423 try:
424 if self.first_run: