From d4f0f223059f064a6c3e465bfff477aa319d0227 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Thu, 7 Jan 2021 00:49:16 +0100 Subject: [PATCH] Log level definition to config file --- config_example/config.py | 1 + smarthome.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config_example/config.py b/config_example/config.py index d85f22c..2d71cba 100644 --- a/config_example/config.py +++ b/config_example/config.py @@ -26,6 +26,7 @@ LOGTARGET = 'stdout' # possible choices are: 'logfile' or 'stdout' # APP_NAME = 'smarthome' LOGTARGET = 'stdout' # possible choices are: 'logfile' or 'stdout' +LOGLVL = 'DEBUG' LOGHOST = 'localhost' LOGPORT = 19996 diff --git a/smarthome.py b/smarthome.py index 2c5d499..a8e14f1 100644 --- a/smarthome.py +++ b/smarthome.py @@ -369,7 +369,7 @@ class MyApp(wx.App): if __name__ == "__main__": - report.appLoggingConfigure(os.path.dirname(__file__), config.LOGTARGET, ((config.APP_NAME, 'DEBUG'), ), fmt=config.formatter, host=config.LOGHOST, port=config.LOGPORT) + report.appLoggingConfigure(os.path.dirname(__file__), config.LOGTARGET, ((config.APP_NAME, config.LOGLVL), ), fmt=config.formatter, host=config.LOGHOST, port=config.LOGPORT) # app = MyApp(0) app.frame.run()