log level added to config

This commit is contained in:
Dirk Alders 2023-10-31 09:03:13 +01:00
parent 81b11969ca
commit ae0ae97b5c
2 changed files with 5 additions and 2 deletions

View File

@ -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"

View File

@ -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