better handling of logging variables
paulfantom committed
Aug 20, 2016 at 15:22 UTC
76f23992182b5efb1ab6b5e101991b545da325e0
1 file changed
+4
-2
plugins.d/python.d.plugin
+4
-2
@@ -477,6 +477,8 @@ def run():
477
configfile = CONFIG_DIR + "python.d.conf"
478
msg.PROGRAM = PROGRAM
479
msg.info("reading configuration file:", configfile)
480
+ log_counter = 200
481
+ log_interval = 3600
482
483
conf = read_config(configfile)
484
if conf is not None:
@@ -498,11 +500,11 @@ def run():
500
try:
501
log_counter = conf['logs_per_interval']
502
except (KeyError, TypeError):
501
- log_counter = 200
503
+ pass
504
try:
505
log_interval = conf['log_interval']
506
except (KeyError, TypeError):
505
- log_interval = 3600
507
+ pass
508
for k, v in conf.items():
509
if k in ("update_every", "debug", "enabled"):
510
continue