diff --git a/config_example/config.py b/config_example/config.py index e2a4d82..960dc41 100644 --- a/config_example/config.py +++ b/config_example/config.py @@ -1,8 +1,11 @@ import geo +import logging import report from topics import * -DEBUG = False +DEBUG = False # False: logging to stdout with given LOGLEVEL - True: logging all to localhost:19996 and warnings or higher to stdout +LOGLEVEL = logging.INFO + GEO_POSITION = geo.gps.coordinate(lat=49.519167, lon=9.3672222) APP_NAME = "smart_brain" diff --git a/smart_brain.py b/smart_brain.py index f88d05a..e899543 100644 --- a/smart_brain.py +++ b/smart_brain.py @@ -46,7 +46,7 @@ if __name__ == "__main__": report.appLoggingConfigure(None, 'stdout', ((config.APP_NAME, logging.DEBUG), ), target_level=logging.WARNING, fmt=report.SHORT_FMT, host='localhost', port=19996) else: - report.stdoutLoggingConfigure(((config.APP_NAME, logging.WARNING), ), report.SHORT_FMT) + report.stdoutLoggingConfigure(((config.APP_NAME, config.LOGLEVEL), ), report.SHORT_FMT) # # MQTT Client