]> arthur.barton.de Git - netdata.git/commitdiff
better handling of logging variables
authorpaulfantom <paulfantom@gmail.com>
Sat, 20 Aug 2016 13:22:38 +0000 (15:22 +0200)
committerpaulfantom <paulfantom@gmail.com>
Sat, 20 Aug 2016 13:22:38 +0000 (15:22 +0200)
plugins.d/python.d.plugin

index 5a8768d42321c95656dfb1a52335007d9b16a9d3..5e81fb263c0489807449b9fdff79a0db0c72a6d7 100755 (executable)
@@ -477,6 +477,8 @@ def run():
     configfile = CONFIG_DIR + "python.d.conf"
     msg.PROGRAM = PROGRAM
     msg.info("reading configuration file:", configfile)
+    log_counter = 200
+    log_interval = 3600
 
     conf = read_config(configfile)
     if conf is not None:
@@ -498,11 +500,11 @@ def run():
         try:
             log_counter = conf['logs_per_interval']
         except (KeyError, TypeError):
-            log_counter = 200
+            pass
         try:
             log_interval = conf['log_interval']
         except (KeyError, TypeError):
-            log_interval = 3600
+            pass
         for k, v in conf.items():
             if k in ("update_every", "debug", "enabled"):
                 continue