diff --git a/config.cfg b/config.cfg index 270b315..aa28b41 100644 --- a/config.cfg +++ b/config.cfg @@ -7,7 +7,7 @@ max_img_rotation = 10 hours_spanned = 48 [Log] -fieldname_order=["time", "id", "category", "type", "value"] +fieldname_order=["id", "category", "type", "value"] [RedisLog] host=localhost diff --git a/server.py b/server.py index 0716029..087e236 100755 --- a/server.py +++ b/server.py @@ -32,6 +32,7 @@ eventNumber = 0 class LogItem(): FIELDNAME_ORDER = [] + FIELDNAME_ORDER.append("time") for item in json.loads(cfg.get('Log', 'fieldname_order')): FIELDNAME_ORDER.append(item) diff --git a/zmq_subscriber.py b/zmq_subscriber.py index 27624fa..c07e1d4 100755 --- a/zmq_subscriber.py +++ b/zmq_subscriber.py @@ -80,7 +80,7 @@ def default_attribute(jsonattr): print('sending', 'attribute') jsonattr = jsonattr['Attribute'] to_push = [] - for field in json.loads(cfg.get('Log', 'fieldname_order'))[1:]: + for field in json.loads(cfg.get('Log', 'fieldname_order')): to_push.append(jsonattr[field]) #try to get coord