Commit 208cd29f authored by julric's avatar julric

moved declaration of text-file to outputs.cfg

parent d7972922
......@@ -15,6 +15,7 @@ enabled=off
[Log]
filename=log
enabled=off
text_file=sensors.log
[RRD]
filename=rrd
......
......@@ -2,12 +2,13 @@ import output
import datetime
class Log(output.Output):
requiredData = []
requiredData = ["text_file"]
optionalData = []
def __init__(self,data):
pass
self.text_file=data["text_file"]
def outputData(self,dataPoints):
f = open('sensors.log', 'a')
f = open(self.text_file, 'a')
logline = '{"time":"'
logline += str(datetime.datetime.now())
logline += '",'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment