diff --git a/config_example/config.j2 b/config_example/config.j2 index 45c6176..e79bed2 100644 --- a/config_example/config.j2 +++ b/config_example/config.j2 @@ -3,13 +3,20 @@ import logging import report from topics import * -DEBUG = False # False: logging to stdout with given LOGLEVEL - True: logging all to localhost:19996 and warnings or higher to stdout +DEBUG = False +# +# Logging +# +APP_NAME = "smart_brain" LOG_HOSTNAME = "loggy" # When DEBUG is True LOG_LEVEL = logging.INFO # STDOUT logging + +# +# Application +# GEO_POSITION = geo.gps.coordinate(lat=49.519167, lon=9.3672222) -APP_NAME = "smart_brain" MQTT_SERVER = "{{ smart_srv_brain_hostname }}" MQTT_PORT = 1883 diff --git a/report b/report index 92bf9fb..9ad0dd0 160000 --- a/report +++ b/report @@ -1 +1 @@ -Subproject commit 92bf9fb66a809a8bc71b02b6b815a4b00d56e445 +Subproject commit 9ad0dd05a5daaed39308e5c5fd87d46e142fd800 diff --git a/smart_brain.py b/smart_brain.py index ffbcb93..6e1ccc5 100644 --- a/smart_brain.py +++ b/smart_brain.py @@ -9,7 +9,7 @@ import report import subprocess import time -logger = logging.getLogger(config.APP_NAME) +logger = report.default_logging_config() VERS_MAJOR = 1 @@ -39,13 +39,6 @@ def __info_publisher__(client, userdata, message): if __name__ == "__main__": - # - # Logging - # - report.add_handler_stdout(logger, config.LOG_LEVEL) - if config.DEBUG: - report.add_handler_socket(logger, host=config.LOG_HOSTNAME) - # # MQTT Client #