Compare commits

..

2 Commits

Author SHA1 Message Date
d9d0dcdbaf
logging basicconig marcsello edition
All checks were successful
continuous-integration/drone/push Build is passing
2020-09-18 14:45:58 +02:00
f18d2018e3
logging basicconig 2020-09-18 14:44:20 +02:00

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import sys
import json import json
import logging import logging
@ -69,6 +70,8 @@ def on_message(channel, method_frame, header_frame, body):
if __name__ == "__main__": if __name__ == "__main__":
logging.basicConfig(stream=sys.stdout, format="%(asctime)s - %(name)s [%(levelname)s]: %(message)s",
level=logging.DEBUG if '--debug' in sys.argv else logging.INFO)
logging.info("Guard service starting") logging.info("Guard service starting")
mqtt = MQTT() mqtt = MQTT()
mqtt.topic = config.MQTT_TOPIC mqtt.topic = config.MQTT_TOPIC