Commit 355eb681 authored by Nico Schottelius's avatar Nico Schottelius

Add debug printing

parent d3f73e68
......@@ -12,8 +12,6 @@ import lorautil
import logging
import sys
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
known_devices = [ "0004A30B001C6613" ]
......@@ -41,6 +39,8 @@ def get_gps(deveui, payload):
text = ":lat={lat:.6f} lon={lon:.6f} alt={alt:.6f} acc={acc:.2f}".format(**values)
res = [ deveui + text ]
log.debug("ttn mapper: {}".format(res[0]))
return res
def decode(pkg):
......@@ -68,6 +68,10 @@ def nodered(provider, data):
lorautil.nodered_send(provider, d)
if __name__ == '__main__':
logging.basicConfig(format='%(levelname)s: %(message)s')
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
conns = lorautil.pg_conn_notify()
while True:
......
......@@ -20,7 +20,6 @@ log = logging.getLogger(__name__)
dbname="lorawan"
def db_notify(provider, payload='', deveui=''):
notify="{}:{}".format(deveui, payload)
log.debug("Notify: {} {}".format(provider, notify))
......
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